Boost logo

Boost :

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

"Robert Ramey" <ramey_at_[hidden]> wrote in message
> 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.


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