|
Boost Users : |
From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-11-14 15:57:09
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<is_base_and_derived<_, remove_pointer<_> > >::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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net