Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-12-02 15:42:21


"Robert Ramey" <ramey_at_[hidden]> wrote in message
news:conqf6$hnh$1_at_sea.gmane.org...
> The documentation for has_trivial_constructor has some cryptic note:
> Without some (as yet unspecified) help from the compiler,
> has_trivial_constructor will never report that a class or struct has a
> trivial constructor; this is always safe, if possibly sub-optimal.
>
> What does this mean - it sounds like its of new use - then why is it there?

Certain compilers provide special information about types that can't be queried
in std C++. The type traits library uses this, where possible, but always
provides a conservative fallback answer.

See <boost/type_traits/intrinsics.hpp>

TR1 contains similar language, but the hope (I think) is that C++0x will contain
enough compile-time reflection to allow these traits to be implemented
'optimally' in standard C++0x.

Jonathan


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