Index: boost/mpl/has_xxx.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/mpl/has_xxx.hpp,v retrieving revision 1.5 diff -d -u -r1.5 has_xxx.hpp --- boost/mpl/has_xxx.hpp 9 Nov 2006 01:14:10 -0000 1.5 +++ boost/mpl/has_xxx.hpp 28 Mar 2007 14:12:53 -0000 @@ -4,6 +4,7 @@ // Copyright Aleksey Gurtovoy 2002-2006 // Copyright David Abrahams 2002-2003 +// Copyright Daniel Walker 2007 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at @@ -18,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -25,6 +27,8 @@ #include #include +#include +#include #if !defined(BOOST_MPL_CFG_NO_HAS_XXX) @@ -230,4 +234,139 @@ BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(BOOST_PP_CAT(has_,name), name, false) \ /**/ +#if !defined(BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE) + +// Create boolean n-ary Metafunction to detect a nested template +// member with n template parameters. This implementation is based on +// a USENET newsgroup's posting by Aleksey Gurtovoy +// (comp.lang.c++.moderated, 2002-03-19), Rani Sharoni's USENET +// posting cited above, and the non-template has_xxx implementations +// above. + +# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +# define BOOST_MPL_HAS_XXX_NESTED_TEMPLATE(name, n) \ + U::name< BOOST_PP_ENUM_PARAMS(n, U) > \ + /**/ +# else +# define BOOST_MPL_HAS_XXX_NESTED_TEMPLATE(name, n) \ + typename U::template name< BOOST_PP_ENUM_PARAMS(n, U) > \ + /**/ +# endif + +# if !defined(BOOST_MPL_HAS_XXX_NO_REJECT_TEMPLATE_FUNCTION) +# if (defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) \ + || BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, < 0x0304) \ + || BOOST_WORKAROUND(BOOST_MSVC, < 1300)) +# define BOOST_MPL_HAS_XXX_NO_REJECT_TEMPLATE_FUNCTION +# endif +# endif + +# if defined(BOOST_MPL_HAS_XXX_NO_REJECT_TEMPLATE_FUNCTION) +# define BOOST_MPL_HAS_XXX_TEMPLATE_REJECT_FUNCTION(name, n) \ + static boost::mpl::aux::no_tag \ + test(...); \ + /**/ +# else +# define BOOST_MPL_HAS_XXX_TEMPLATE_REJECT_FUNCTION(name, n) \ + template< typename U > \ + static boost::mpl::aux::no_tag \ + test(...); \ + /**/ +# endif + +# define BOOST_MPL_HAS_XXX_TEMPLATE_ACCEPT_FUNCTION(name, n) \ + template< typename U > \ + static boost::mpl::aux::yes_tag \ + test( \ + boost::mpl::aux::type_wrapper* \ + , boost::mpl::aux::type_wrapper< \ + BOOST_MPL_HAS_XXX_NESTED_TEMPLATE(name, n) \ + >* = 0 \ + ); \ + /**/ + +# define BOOST_MPL_HAS_XXX_TEMPLATE_DETECTOR(name, n) \ + struct detector { \ + BOOST_MPL_HAS_XXX_TEMPLATE_REJECT_FUNCTION(name, n) \ + BOOST_MPL_HAS_XXX_TEMPLATE_ACCEPT_FUNCTION(name, n) \ + }; \ + /**/ + +# if defined(BOOST_MPL_HAS_XXX_NO_REJECT_TEMPLATE_FUNCTION) +# define BOOST_MPL_HAS_XXX_TEMPLATE_TEST(name, n) \ + detector::test(static_cast* >(0)) \ + /**/ +# else +# define BOOST_MPL_HAS_XXX_TEMPLATE_TEST(name, n) \ + detector::template test(0) \ + /**/ +# endif + +// For example, +// BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(has_xxx, xxx, 2, false) +// expands to something like the following. +// +// template< typename T, typename U0, typename U1 +// , typename fallback_ = boost::mpl::bool_ > +// class has_xxx { +// struct detector { +// template< typename U > +// static boost::mpl::aux::no_tag +// test(...); +// +// template< typename U > +// static boost::mpl::aux::yes_tag +// test( +// boost::mpl::aux::type_wrapper* +// , boost::mpl::aux::type_wrapper< +// typename U::template xxx< U0, U1 > +// >* = 0 +// ); +// }; +// public: +// static const bool value +// = sizeof(detector::template test(0)) +// == sizeof(boost::mpl::aux::yes_tag); +// typedef boost::mpl::bool_ type; +// }; + +# define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, n, default_) \ + template< typename T BOOST_PP_ENUM_TRAILING_PARAMS(n, typename U) \ + , typename fallback_ = boost::mpl::bool_ > \ + class trait { \ + BOOST_MPL_HAS_XXX_TEMPLATE_DETECTOR(name, n) \ + public: \ + BOOST_STATIC_CONSTANT(bool, value \ + = sizeof(BOOST_MPL_HAS_XXX_TEMPLATE_TEST(name, n)) \ + == sizeof(boost::mpl::aux::yes_tag) \ + ); \ + typedef boost::mpl::bool_ type; \ + }; \ + /**/ + +# undef BOOST_MPL_HAS_XXX_NO_REJECT_TEMPLATE_FUNCTION + +#else // BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE + +// placeholder implementation + +# define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, n, default_) \ +template< typename T \ + BOOST_PP_ENUM_TRAILING_PARAMS(n, typename U) \ + , typename fallback_ = boost::mpl::bool_ > \ +struct trait \ +{ \ + BOOST_STATIC_CONSTANT(bool, value = fallback_::value); \ + typedef fallback_ type; \ +}; \ +/**/ + +#endif // BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE + +# define BOOST_MPL_HAS_XXX_TEMPLATE_DEF(name, n) \ + BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF( \ + BOOST_PP_CAT(has_, name), name, n, false \ + ) \ +/**/ + #endif // BOOST_MPL_HAS_XXX_HPP_INCLUDED Index: boost/mpl/aux_/config/has_xxx.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/mpl/aux_/config/has_xxx.hpp,v retrieving revision 1.3 diff -d -u -r1.3 has_xxx.hpp --- boost/mpl/aux_/config/has_xxx.hpp 3 Sep 2004 15:56:56 -0000 1.3 +++ boost/mpl/aux_/config/has_xxx.hpp 28 Mar 2007 14:12:53 -0000 @@ -27,6 +27,7 @@ ) # define BOOST_MPL_CFG_NO_HAS_XXX +# define BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE #endif Index: libs/mpl/doc/src/refmanual/CFG_NO_HAS_XXX_TEMPLATE.rst =================================================================== RCS file: libs/mpl/doc/src/refmanual/CFG_NO_HAS_XXX_TEMPLATE.rst diff -N libs/mpl/doc/src/refmanual/CFG_NO_HAS_XXX_TEMPLATE.rst --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ libs/mpl/doc/src/refmanual/CFG_NO_HAS_XXX_TEMPLATE.rst 28 Mar 2007 14:13:28 -0000 @@ -0,0 +1,27 @@ +.. Macros/Configuration//BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE |20 + +BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE +======================== + +Synopsis +-------- + +.. parsed-literal:: + + // #define BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE + + +Description +----------- + +``BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE`` is a boolean configuration +macro signaling availability of the |BOOST_MPL_HAS_XXX_TEMPLATE_DEF| / +|BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF| introspection macros' +functionality on a particular compiler. + + +See also +-------- + +|Macros|, |Configuration|, |BOOST_MPL_HAS_XXX_TEMPLATE_DEF|, |BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF| + Index: libs/mpl/doc/src/refmanual/HAS_XXX_TEMPLATE_DEF.rst =================================================================== RCS file: libs/mpl/doc/src/refmanual/HAS_XXX_TEMPLATE_DEF.rst diff -N libs/mpl/doc/src/refmanual/HAS_XXX_TEMPLATE_DEF.rst --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ libs/mpl/doc/src/refmanual/HAS_XXX_TEMPLATE_DEF.rst 28 Mar 2007 14:13:28 -0000 @@ -0,0 +1,120 @@ +.. Macros/Introspection//BOOST_MPL_HAS_XXX_TEMPLATE_DEF + +BOOST_MPL_HAS_XXX_TEMPLATE_DEF +=========================== + +Synopsis +-------- + +.. parsed-literal:: + + #define BOOST_MPL_HAS_XXX_TEMPLATE_DEF(name, n) \\ + |unspecified-token-seq| \\ + /\*\*/ + + +Description +----------- + +Expands into a definition of a boolean n-ary |Metafunction| +``has_name`` such that for any types ``x, a1, a2, ..., an`` +``has_name::value == true`` if and only if ``x`` is a +class type and has a nested template member ``x::template name``. + +On the deficient compilers not capable of performing the detection, +``has_name::value`` always returns ``false``. A +boolean configuration macro, |BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE|, is +provided to signal or override the "deficient" status of a particular +compiler. + +|Note:| |BOOST_MPL_HAS_XXX_TEMPLATE_DEF| is a simplified front end to +the |BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF| introspection macro |-- end +note| + + +Header +------ + +.. parsed-literal:: + + #include + + +Parameters +---------- + + ++---------------+-------------------------------+---------------------------------------------------+ +| Parameter | Requirement | Description | ++===============+===============================+===================================================+ +| ``name`` | A legal identifier token | A name of the template member being detected. | ++---------------+-------------------------------+---------------------------------------------------+ +| ``n`` | An integral constant >= 0 | The arity of the template member being detected. | ++---------------+-------------------------------+---------------------------------------------------+ + + +Expression semantics +-------------------- + +For any legal C++ identifier ``name`` and integral constant expression +``n`` greater than or equal to 0: + +.. parsed-literal:: + + BOOST_MPL_HAS_XXX_TEMPLATE_DEF(name, n) + +:Precondition: + Appears at namespace scope. + +:Return type: + None. + +:Semantics: + Equivalent to + + .. parsed-literal:: + + BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF( + BOOST_PP_CAT(has\_,name), name, n, false + ) + + +Example +------- + +.. parsed-literal:: + + BOOST_MPL_HAS_XXX_TEMPLATE_DEF(xxx, 1) + + struct test1 {}; + struct test2 { void xxx(); }; + struct test3 { int xxx; }; + struct test4 { static int xxx(); }; + struct test5 { typedef int xxx; }; + struct test6 { struct xxx; }; + struct test7 { typedef void (*xxx)(); }; + struct test8 { typedef void (xxx)(); }; + struct test9 { template< class T > struct xxx {}; }; + + BOOST_MPL_ASSERT_NOT(( has_xxx )); + BOOST_MPL_ASSERT_NOT(( has_xxx )); + BOOST_MPL_ASSERT_NOT(( has_xxx )); + BOOST_MPL_ASSERT_NOT(( has_xxx )); + BOOST_MPL_ASSERT_NOT(( has_xxx )); + BOOST_MPL_ASSERT_NOT(( has_xxx )); + BOOST_MPL_ASSERT_NOT(( has_xxx )); + BOOST_MPL_ASSERT_NOT(( has_xxx )); + + #if !defined(BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE) + BOOST_MPL_ASSERT(( has_xxx )); + #endif + + BOOST_MPL_ASSERT(( has_xxx )); + + +See also +-------- + +|Macros|, |BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF|, |BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE| + Index: libs/mpl/doc/src/refmanual/HAS_XXX_TEMPLATE_NAMED_DEF.rst =================================================================== RCS file: libs/mpl/doc/src/refmanual/HAS_XXX_TEMPLATE_NAMED_DEF.rst diff -N libs/mpl/doc/src/refmanual/HAS_XXX_TEMPLATE_NAMED_DEF.rst --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ libs/mpl/doc/src/refmanual/HAS_XXX_TEMPLATE_NAMED_DEF.rst 28 Mar 2007 14:13:28 -0000 @@ -0,0 +1,165 @@ +.. Macros/Introspection//BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF + +BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF +================================= + +Synopsis +-------- + +.. parsed-literal:: + + #define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, n, default\_) \\ + |unspecified-token-seq| \\ + /\*\*/ + + +Description +----------- + +Expands into a definition of a boolean n-ary |Metafunction| ``trait`` +such that for any types ``x, a1, a2, ..., an`` ``trait::value == true`` if and only if ``x`` is a class type and has a +nested template member ``x::template name``. + +On the deficient compilers not capable of performing the detection, +``trait::value`` always returns a fallback value +``default_``. A boolean configuration macro, +|BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE|, is provided to signal or override +the "deficient" status of a particular compiler. |Note:| The fallback +value can also be provided at the point of the metafunction +invocation; see the `Expression semantics` section for details |-- end +note| + + +Header +------ + +.. parsed-literal:: + + #include + + +Parameters +---------- + ++---------------+-------------------------------+---------------------------------------------------+ +| Parameter | Requirement | Description | ++===============+===============================+===================================================+ +| ``trait`` | A legal identifier token | A name of the metafunction to be generated. | ++---------------+-------------------------------+---------------------------------------------------+ +| ``name`` | A legal identifier token | A name of the member being detected. | ++---------------+-------------------------------+---------------------------------------------------+ +| ``n`` | An integral constant >= 0 | The arity of the template member being detected. | ++---------------+-------------------------------+---------------------------------------------------+ +| ``default_`` | An boolean constant | A fallback value for the deficient compilers. | ++---------------+-------------------------------+---------------------------------------------------+ + + +Expression semantics +-------------------- + +For any legal C++ identifiers ``trait`` and ``name``, integral +constant expression ``n`` greater than or equal to 0, boolean constant +expression ``c1``, boolean |Integral Constant| ``c2``, and arbitrary +type ``x``: + +.. parsed-literal:: + + BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, n, c1) + +:Precondition: + Appears at namespace scope. + +:Return type: + None. + +:Semantics: + Expands into an equivalent of the following class template + definition + + .. parsed-literal:: + + template< + typename X + , typename A1, ..., typename An + , typename fallback = boost::mpl::bool_ + > + struct trait + { + // |unspecified| + // ... + }; + + where ``trait`` is a boolean |Metafunction| with the following + semantics: + + .. parsed-literal:: + + typedef trait::type r; + + :Return type: + |Integral Constant|. + + :Semantics: + If |BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE| is defined, ``r::value + == c1``; otherwise, ``r::value == true`` if and only if ``x`` + is a class type that has a nested type member ``x::template + name``. + + + .. parsed-literal:: + + typedef trait< x, a1, ..., an, c2 >::type r; + + :Return type: + |Integral Constant|. + + :Semantics: + If |BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE| is defined, ``r::value + == c2::value``; otherwise, equivalent to + + .. parsed-literal:: + + typedef trait::type r; + + +Example +------- + +.. parsed-literal:: + + BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF( + has_xxx, xxx, 1, false + ) + + struct test1 {}; + struct test2 { void xxx(); }; + struct test3 { int xxx; }; + struct test4 { static int xxx(); }; + struct test5 { typedef int xxx; }; + struct test6 { struct xxx; }; + struct test7 { typedef void (*xxx)(); }; + struct test8 { typedef void (xxx)(); }; + struct test9 { template< class T > struct xxx {}; }; + + BOOST_MPL_ASSERT_NOT(( has_xxx )); + BOOST_MPL_ASSERT_NOT(( has_xxx )); + BOOST_MPL_ASSERT_NOT(( has_xxx )); + BOOST_MPL_ASSERT_NOT(( has_xxx )); + BOOST_MPL_ASSERT_NOT(( has_xxx )); + BOOST_MPL_ASSERT_NOT(( has_xxx )); + BOOST_MPL_ASSERT_NOT(( has_xxx )); + BOOST_MPL_ASSERT_NOT(( has_xxx )); + + #if !defined(BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE) + BOOST_MPL_ASSERT(( has_xxx )); + #endif + + BOOST_MPL_ASSERT(( has_xxx )); + + +See also +-------- + +|Macros|, |BOOST_MPL_HAS_XXX_TEMPLATE_DEF|, |BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE| + Index: libs/mpl/test/has_xxx.cpp =================================================================== RCS file: /cvsroot/boost/boost/libs/mpl/test/has_xxx.cpp,v retrieving revision 1.4 diff -d -u -r1.4 has_xxx.cpp --- libs/mpl/test/has_xxx.cpp 18 Sep 2004 07:18:02 -0000 1.4 +++ libs/mpl/test/has_xxx.cpp 28 Mar 2007 14:13:29 -0000 @@ -16,6 +16,11 @@ #include BOOST_MPL_HAS_XXX_TRAIT_DEF(xxx) +BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(has_xxx0, xxx, 0, false) +BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(has_yyy0, yyy, 0, false) +BOOST_MPL_HAS_XXX_TEMPLATE_DEF(xxx1, 1) +BOOST_MPL_HAS_XXX_TEMPLATE_DEF(xxx2, 2) +BOOST_MPL_HAS_XXX_TEMPLATE_DEF(xxx3, 3) struct a1 {}; struct a2 { void xxx(); }; @@ -31,6 +36,12 @@ struct b6 { typedef void (*xxx)(); }; struct b7 { typedef void (xxx)(); }; +struct c0 { template< typename T0 = int > struct xxx {}; }; +struct C0 { template< typename T0 = int > struct yyy {}; }; +struct c1 { template< typename T1 > struct xxx1 {}; }; +struct c2 { template< typename T1, typename T2 > struct xxx2 {}; }; +struct c3 { template< typename T1, typename T2, typename T3 > struct xxx3 {}; }; + template< typename T > struct outer; template< typename T > struct inner { typedef typename T::type type; }; @@ -42,25 +53,56 @@ MPL_TEST_CASE() { MPL_ASSERT_NOT(( has_xxx )); + MPL_ASSERT_NOT(( has_xxx0 )); #if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) MPL_ASSERT_NOT(( has_xxx )); + MPL_ASSERT_NOT(( has_xxx0 )); MPL_ASSERT_NOT(( has_xxx )); + MPL_ASSERT_NOT(( has_xxx0 )); MPL_ASSERT_NOT(( has_xxx )); + MPL_ASSERT_NOT(( has_xxx0 )); MPL_ASSERT_NOT(( has_xxx )); + MPL_ASSERT_NOT(( has_xxx0 )); MPL_ASSERT_NOT(( has_xxx )); + MPL_ASSERT_NOT(( has_xxx0 )); MPL_ASSERT_NOT(( has_xxx )); + MPL_ASSERT_NOT(( has_xxx0 )); MPL_ASSERT_NOT(( has_xxx )); + MPL_ASSERT_NOT(( has_xxx0 )); #if !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) MPL_ASSERT_NOT(( has_xxx )); #endif MPL_ASSERT_NOT(( has_xxx< enum_ > )); + MPL_ASSERT_NOT(( has_xxx0< enum_ > )); #endif MPL_ASSERT_NOT(( has_xxx )); + MPL_ASSERT_NOT(( has_xxx0 )); MPL_ASSERT_NOT(( has_xxx< outer< inner > > )); + MPL_ASSERT_NOT(( has_xxx0< outer< inner > > )); MPL_ASSERT_NOT(( has_xxx< incomplete > )); + MPL_ASSERT_NOT(( has_xxx0< incomplete > )); MPL_ASSERT_NOT(( has_xxx< abstract > )); + MPL_ASSERT_NOT(( has_xxx0< abstract > )); MPL_ASSERT_NOT(( has_xxx< noncopyable > )); + MPL_ASSERT_NOT(( has_xxx0< noncopyable > )); + +#if !BOOST_WORKAROUND(__COMO__, BOOST_TESTED_AT(4308)) + MPL_ASSERT_NOT(( has_xxx0 )); + MPL_ASSERT_NOT(( has_xxx0 )); + MPL_ASSERT_NOT(( has_xxx0 )); + MPL_ASSERT_NOT(( has_xxx0 )); + MPL_ASSERT_NOT(( has_xxx0 )); + MPL_ASSERT_NOT(( has_xxx0 )); + MPL_ASSERT_NOT(( has_xxx0 )); +#endif + + MPL_ASSERT_NOT(( has_yyy0 )); + MPL_ASSERT_NOT(( has_xxx0 )); + MPL_ASSERT_NOT(( has_xxx0 )); + MPL_ASSERT_NOT(( has_xxx1 )); + MPL_ASSERT_NOT(( has_xxx2 )); + MPL_ASSERT_NOT(( has_xxx3 )); MPL_ASSERT(( has_xxx )); MPL_ASSERT(( has_xxx )); @@ -70,10 +112,23 @@ MPL_ASSERT(( has_xxx )); MPL_ASSERT(( has_xxx )); +#if !BOOST_WORKAROUND(__COMO__, BOOST_TESTED_AT(4308)) + MPL_ASSERT(( has_xxx0 )); + MPL_ASSERT(( has_yyy0 )); +#endif + + MPL_ASSERT(( has_xxx1 )); + MPL_ASSERT(( has_xxx2 )); + MPL_ASSERT(( has_xxx3 )); + #if !defined(HAS_XXX_ASSERT) # define HAS_XXX_ASSERT(x) MPL_ASSERT(x) #endif +#if !defined(HAS_XXX_TEMPLATE_ASSERT) +# define HAS_XXX_TEMPLATE_ASSERT(x) MPL_ASSERT(x) +#endif + HAS_XXX_ASSERT(( has_xxx )); HAS_XXX_ASSERT(( has_xxx )); HAS_XXX_ASSERT(( has_xxx )); @@ -81,4 +136,13 @@ HAS_XXX_ASSERT(( has_xxx )); HAS_XXX_ASSERT(( has_xxx )); HAS_XXX_ASSERT(( has_xxx )); + +#if !BOOST_WORKAROUND(__COMO__, BOOST_TESTED_AT(4308)) + HAS_XXX_TEMPLATE_ASSERT(( has_xxx0 )); + HAS_XXX_TEMPLATE_ASSERT(( has_yyy0 )); +#endif + + HAS_XXX_TEMPLATE_ASSERT(( has_xxx1 )); + HAS_XXX_TEMPLATE_ASSERT(( has_xxx2 )); + HAS_XXX_TEMPLATE_ASSERT(( has_xxx3 )); } Index: libs/mpl/test/no_has_xxx.cpp =================================================================== RCS file: /cvsroot/boost/boost/libs/mpl/test/no_has_xxx.cpp,v retrieving revision 1.2 diff -d -u -r1.2 no_has_xxx.cpp --- libs/mpl/test/no_has_xxx.cpp 2 Sep 2004 15:41:35 -0000 1.2 +++ libs/mpl/test/no_has_xxx.cpp 28 Mar 2007 14:13:29 -0000 @@ -23,4 +23,8 @@ # define HAS_XXX_ASSERT(x) MPL_ASSERT_NOT(x) #endif +#if defined(BOOST_MPL_CFG_NO_HAS_TEMPLATE_XXX) +# define HAS_XXX_TEMPLATE_ASSERT(x) MPL_ASSERT_NOT(x) +#endif + #include "has_xxx.cpp"