Boost logo

Boost :

Subject: Re: [boost] [1.44] Beta progress?
From: David Abrahams (dave_at_[hidden])
Date: 2010-07-27 11:09:26

At Mon, 26 Jul 2010 12:07:16 -0600,
Matthias Troyer wrote:
> > I see the utility of augmenting STRONG_TYPEDEF but
> > I wonder about it. if you have code T:base_type and
> > T is not one of the types we're using - it won't have
> > this available - compiler error. Wouldn't it be better
> > to specify the implicit requirements as above and just
> > know that T will be converted to what one wants? and
> > sizeof(T) can be applied to both the (now) more elaborate
> > types as well as C++ primitives.
> The only problem I see with sizeof(T) is that it cannot tell me
> about signedness. Otherwise I could hack it from sizeof(T)

You should get the nested typedef; that is the non-hack solution.
That said, I could write you a metafunction to discover signedness if
you need it.

Dave Abrahams
BoostPro Computing

Boost list run by bdawes at, gregod at, cpdaniel at, john at