| 1 |
|
|---|
| 2 | --- boost/mpl/has_xxx.hpp 2005-06-15 12:43:23.000000000 +0200
|
|---|
| 3 | +++ /Users/troyer/Desktop/has_xxx.hpp 2007-06-12 10:36:42.000000000
|
|---|
| 4 | +0200
|
|---|
| 5 | @@ -1,7 +1,6 @@
|
|---|
| 6 | #ifndef BOOST_MPL_HAS_XXX_HPP_INCLUDED
|
|---|
| 7 | #define BOOST_MPL_HAS_XXX_HPP_INCLUDED
|
|---|
| 8 | -
|
|---|
| 9 | // Copyright Aleksey Gurtovoy 2002-2004
|
|---|
| 10 | // Copyright David Abrahams 2002-2003
|
|---|
| 11 | //
|
|---|
| 12 | @@ -183,21 +182,21 @@
|
|---|
| 13 | # else // other SFINAE-capable compilers
|
|---|
| 14 | + struct gcc_3_2_wknd
|
|---|
| 15 | + {
|
|---|
| 16 | + template< typename U >
|
|---|
| 17 | + static boost::mpl::aux::yes_tag test(
|
|---|
| 18 | + boost::mpl::aux::type_wrapper<U> const volatile*
|
|---|
| 19 | + , boost::mpl::aux::type_wrapper<BOOST_MSVC_TYPENAME
|
|---|
| 20 | U::name>* = 0
|
|---|
| 21 | + );
|
|---|
| 22 | +
|
|---|
| 23 | + static boost::mpl::aux::no_tag test(...);
|
|---|
| 24 | + };
|
|---|
| 25 | +
|
|---|
| 26 | # define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \
|
|---|
| 27 | template< typename T, typename fallback_ =
|
|---|
| 28 | boost::mpl::bool_<default_> > \
|
|---|
| 29 | struct trait \
|
|---|
| 30 | { \
|
|---|
| 31 | - struct gcc_3_2_wknd \
|
|---|
| 32 | - { \
|
|---|
| 33 | - template< typename U > \
|
|---|
| 34 | - static boost::mpl::aux::yes_tag test( \
|
|---|
| 35 | - boost::mpl::aux::type_wrapper<U> const volatile* \
|
|---|
| 36 | - , boost::mpl::aux::type_wrapper<BOOST_MSVC_TYPENAME
|
|---|
| 37 | U::name>* = 0 \
|
|---|
| 38 | - ); \
|
|---|
| 39 | - \
|
|---|
| 40 | - static boost::mpl::aux::no_tag test(...); \
|
|---|
| 41 | - }; \
|
|---|
| 42 | - \
|
|---|
| 43 | typedef boost::mpl::aux::type_wrapper<T> t_; \
|
|---|
| 44 | BOOST_STATIC_CONSTANT(bool, value = \
|
|---|
| 45 | sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) \
|
|---|