Boost logo

Boost :

From: John Maddock (jm_at_[hidden])
Date: 2003-02-22 07:16:26


>Looks very good, especially given the fact that compile-failures are
>replaced by returning the unmodified type (IIUC :) One thing that may
>lead to a slight problem is in the last part:

Thanks.

>"If there is no means by which the implentation can differentiate
>between class and union types, then the class templates is_class and
>is_union need not be provided."
>
>I think it is much more useful to provide is_class and treat unions as
>classes in this case. Optionally we could add 'is_class_or_union' as
>most compilers are able to implement this even when they cannot provide
>is_class and is_union - and it would IMHO be a shame not to have this
>trait.

Remember that this is a *temporary* latitude that has been granted - there
is already one compiler (Metrowerks) that does the right thing, and gcc is
likely to follow suite soon, no doubt others will as well. IMO it is better
to have the semantics we want to specified even if it means that we have to
wait a while for it. Users can always add their own is_class_or_union as a
negation of all the other primary traits. The reason for wanting is_class
to exclude union types is simply that 90%+ of it's usage is to determine
whether a type can be used as a base class or not - and unions can not.

>And for the unimportant part: Is "boolian" correct or should it be
>"boolean"?

Yes it should, thanks.

John.


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