Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2000-10-19 16:48:51


----- Original Message -----
From: "Howard Hinnant" <hinnant_at_[hidden]>

> Howard Hinnant wrote on 10/19/2000 5:01 PM
> >template <class Symbol>
> >struct special_symbol_map
> >{
> > typedef Symbol symbol_type;
> > typedef typename remove_signedness<Symbol>::type index_type;
> > // ...
> >};
>
> Actually I think the whole thing could be simplified to:
>
> template <class Symbol>
> struct special_symbol_map
> {
> typedef Symbol
> symbol_type;
> typedef typename boost::uint_t<sizeof(Symbol)*CHAR_BIT>::least
> index_type;
> // ...
> };
>
> <sigh> sometimes you have to write more code before you come around to
> the "least code" solution. :-)

And, after all, isn't is_signed already covered by std::numeric_limits<>?

i'm-just-askin-is-all-ly y'rs,
dave


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk