On Thursday 14 November 2002 11:29 am, Sam Gentile wrote:
Well at least you gave somewhat of an answer. I still want to understand
how those particular macros give that portability.
The type traits classes are no longer "normal" traits or metafunctions. They
support argument binding via MPL's lambda facility, so that one can write,
e.g.,
apply > >::value
Supporting the argument binding feature on all compilers requires a lot of
hackery, the nature of which changes depending on the brokenness of the
compiler. More importantly, some of these compilers require changes that are
intrusive into metafunctions that support binding. This intrusiveness is
encapsulated in the macros you found in the type traits headers.
MPL has been accepted into Boost, but has not yet been in any release.
Doug