diff --git a/include/boost/mpl/aux_/has_rebind.hpp b/include/boost/mpl/aux_/has_rebind.hpp index fe191be..de823ce 100644 --- a/include/boost/mpl/aux_/has_rebind.hpp +++ b/include/boost/mpl/aux_/has_rebind.hpp @@ -60,7 +60,7 @@ struct has_rebind #else // the rest template< typename T > struct has_rebind_tag {}; -yes_tag operator|(has_rebind_tag, void const volatile*); +no_tag operator|(has_rebind_tag, void const volatile*); # if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) template< typename T > @@ -68,7 +68,7 @@ struct has_rebind { static has_rebind_tag* get(); BOOST_STATIC_CONSTANT(bool, value = - sizeof(has_rebind_tag() | get()) == sizeof(char) + sizeof(has_rebind_tag() | get()) == sizeof(yes_tag) ); }; # else // __BORLANDC__ @@ -77,7 +77,7 @@ struct has_rebind_impl { static T* get(); BOOST_STATIC_CONSTANT(bool, value = - sizeof(has_rebind_tag() | get()) == sizeof(char) + sizeof(has_rebind_tag() | get()) == sizeof(yes_tag) ); }; diff --git a/include/boost/mpl/aux_/lambda_support.hpp b/include/boost/mpl/aux_/lambda_support.hpp index 2c653cc..5d67d2a 100644 --- a/include/boost/mpl/aux_/lambda_support.hpp +++ b/include/boost/mpl/aux_/lambda_support.hpp @@ -24,9 +24,13 @@ #else # include +# include +# include # include +# include # include # include + # include # include # include @@ -109,15 +113,19 @@ template< typename T > struct has_rebind_tag; #if BOOST_WORKAROUND(__BORLANDC__, < 0x600) # define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ template< BOOST_MPL_PP_PARAMS(i,typename T) > \ -char operator|( \ +::boost::mpl::aux::yes_tag operator|( \ ::boost::mpl::aux::has_rebind_tag \ , name* \ ); \ +::boost::mpl::aux::no_tag operator|( \ + ::boost::mpl::aux::has_rebind_tag \ + , name< BOOST_MPL_PP_ENUM(i,::boost::mpl::na) >* \ + ); \ /**/ #elif !BOOST_WORKAROUND(BOOST_MSVC, <= 1200) # define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ template< BOOST_MPL_PP_PARAMS(i,typename T) > \ -char operator|( \ +::boost::mpl::aux::yes_tag operator|( \ ::boost::mpl::aux::has_rebind_tag \ , ::boost::mpl::aux::has_rebind_tag< name >* \ ); \ diff --git a/include/boost/mpl/aux_/na.hpp b/include/boost/mpl/aux_/na.hpp index 35096c2..416fe5d 100644 --- a/include/boost/mpl/aux_/na.hpp +++ b/include/boost/mpl/aux_/na.hpp @@ -15,22 +15,10 @@ // $Revision$ #include -#include +#include #include #include -BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN - -// n.a. == not available -struct na -{ - typedef na type; - enum { value = 0 }; -}; - -BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE -BOOST_MPL_AUX_ADL_BARRIER_DECL(na) - namespace boost { namespace mpl { template< typename T > diff --git a/include/boost/mpl/aux_/na_fwd.hpp b/include/boost/mpl/aux_/na_fwd.hpp new file mode 100644 index 0000000..7c330f8 --- /dev/null +++ b/include/boost/mpl/aux_/na_fwd.hpp @@ -0,0 +1,31 @@ + +#ifndef BOOST_MPL_AUX_NA_FWD_HPP_INCLUDED +#define BOOST_MPL_AUX_NA_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +// n.a. == not available +struct na +{ + typedef na type; + enum { value = 0 }; +}; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(na) + +#endif // BOOST_MPL_AUX_NA_FWD_HPP_INCLUDED