ADL fixes

[SVN r25453]
This commit is contained in:
Aleksey Gurtovoy
2004-09-28 13:56:59 +00:00
parent 2c49d8d21b
commit 81f7e4bb99
14 changed files with 37 additions and 61 deletions

View File

@@ -23,7 +23,6 @@ BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct arg;
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
BOOST_MPL_AUX_ADL_BARRIER_DECL(arg)
#endif // BOOST_MPL_ARG_FWD_HPP_INCLUDED

View File

@@ -103,12 +103,12 @@ struct assert_relation {};
#else // BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES
aux::weighted_tag<1>::type operator==( assert_, assert_ );
aux::weighted_tag<2>::type operator!=( assert_, assert_ );
aux::weighted_tag<3>::type operator>( assert_, assert_ );
aux::weighted_tag<4>::type operator>=( assert_, assert_ );
aux::weighted_tag<5>::type operator<( assert_, assert_ );
aux::weighted_tag<6>::type operator<=( assert_, assert_ );
boost::mpl::aux::weighted_tag<1>::type operator==( assert_, assert_ );
boost::mpl::aux::weighted_tag<2>::type operator!=( assert_, assert_ );
boost::mpl::aux::weighted_tag<3>::type operator>( assert_, assert_ );
boost::mpl::aux::weighted_tag<4>::type operator>=( assert_, assert_ );
boost::mpl::aux::weighted_tag<5>::type operator<( assert_, assert_ );
boost::mpl::aux::weighted_tag<6>::type operator<=( assert_, assert_ );
template< assert_::relations r, long x, long y > struct assert_relation {};

View File

@@ -23,6 +23,11 @@
# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE mpl_
# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN namespace mpl_ {
# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE }
# define BOOST_MPL_AUX_ADL_BARRIER_DECL(type) \
namespace boost { namespace mpl { \
using ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::type; \
} } \
/**/
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
namespace BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE { namespace aux {} }
@@ -36,22 +41,8 @@ namespace aux { using namespace BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::aux; }
# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE boost::mpl
# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN namespace boost { namespace mpl {
# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE }}
#endif
#if BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, <= 0x0295) \
&& !defined(BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE)
# define BOOST_MPL_AUX_ADL_BARRIER_DECL(type) \
namespace boost { namespace mpl { \
using ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::type; \
} } \
/**/
#else
# define BOOST_MPL_AUX_ADL_BARRIER_DECL(type) /**/
#endif
#endif
#endif // BOOST_MPL_AUX_ADL_BARRIER_HPP_INCLUDED

View File

@@ -49,14 +49,14 @@ template< typename T > struct msvc_eti_base
{
};
#else // BOOST_MPL_CFG_MSVC_70_ETI_BUG
#else // !BOOST_MPL_CFG_MSVC_70_ETI_BUG
template< typename T > struct msvc_eti_base
: T
{
#if BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, > 0x0300) \
&& BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304))
template< typename U > msvc_eti_base( U& x ) : T(x) {}
msvc_eti_base();
#endif
typedef T type;
};

View File

@@ -18,14 +18,10 @@
#include <boost/mpl/bool.hpp>
#include <boost/mpl/aux_/type_wrapper.hpp>
#include <boost/mpl/aux_/yes_no.hpp>
#include <boost/mpl/aux_/adl_barrier.hpp>
#include <boost/type_traits/is_reference.hpp>
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
namespace aux {
namespace boost { namespace mpl { namespace aux {
template< typename T > struct is_class_helper
{
@@ -57,8 +53,6 @@ struct msvc_is_class
{
};
} // namespace aux
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
}}}
#endif // BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED

View File

@@ -19,7 +19,6 @@
#include <boost/mpl/aux_/config/msvc.hpp>
#include <boost/mpl/aux_/config/ctps.hpp>
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
// n.a. == not available
@@ -29,6 +28,11 @@ struct na
enum { value = 0 };
};
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
BOOST_MPL_AUX_ADL_BARRIER_DECL(na)
namespace boost { namespace mpl {
template< typename T >
struct is_na
: false_
@@ -98,6 +102,6 @@ template< typename T, typename U > struct if_na
};
#endif
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
}}
#endif // BOOST_MPL_AUX_NA_HPP_INCLUDED

View File

@@ -21,12 +21,12 @@
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
# include <boost/mpl/assert.hpp>
# define BOOST_MPL_AUX_ASSERT_NOT_NA(x) \
BOOST_MPL_ASSERT_NOT((is_na<type>)) \
BOOST_MPL_ASSERT_NOT((boost::mpl::is_na<type>)) \
/**/
#else
# include <boost/static_assert.hpp>
# define BOOST_MPL_AUX_ASSERT_NOT_NA(x) \
BOOST_STATIC_ASSERT(!is_na<x>::value) \
BOOST_STATIC_ASSERT(!boost::mpl::is_na<x>::value) \
/**/
#endif

View File

@@ -15,7 +15,6 @@
// $Revision$
#include <boost/mpl/aux_/config/gcc.hpp>
#include <boost/mpl/aux_/adl_barrier.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>
#if BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0302)) \
@@ -23,14 +22,12 @@
|| BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x530)) \
|| BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840))
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
namespace aux {
namespace boost { namespace mpl { namespace aux {
template< typename T > struct nested_type_wknd
: T::type
{
};
}
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
}}}
#if BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840))
# define BOOST_MPL_AUX_NESTED_TYPE_WKND(T) \
@@ -38,7 +35,7 @@ BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
/**/
#else
# define BOOST_MPL_AUX_NESTED_TYPE_WKND(T) \
::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::aux::nested_type_wknd<T> \
::boost::mpl::aux::nested_type_wknd<T> \
/**/
#endif

View File

@@ -15,12 +15,9 @@
// $Date$
// $Revision$
#include <boost/mpl/aux_/adl_barrier.hpp>
#include <boost/mpl/aux_/config/ctps.hpp>
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
namespace aux {
namespace boost { namespace mpl { namespace aux {
template< typename T > struct type_wrapper
{
@@ -45,8 +42,6 @@ template< typename W > struct wrapped_type
};
#endif
} // namespace aux
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
}}}
#endif // BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED

View File

@@ -23,10 +23,8 @@
|| defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
# include <boost/mpl/int.hpp>
# include <boost/mpl/aux_/adl_barrier.hpp>
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
namespace aux {
namespace boost { namespace mpl { namespace aux {
template< typename C_ > struct value_wknd
: C_
{
@@ -39,8 +37,7 @@ template<> struct value_wknd<int>
using int_<1>::value;
};
#endif
} // namespace aux
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
}}}
#if !defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
@@ -51,7 +48,7 @@ BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
#else
# define BOOST_MPL_AUX_VALUE_WKND(C) C
# define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) \
::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::aux::value_wknd< C > \
::boost::mpl::aux::value_wknd< C > \
/**/
#endif

View File

@@ -14,15 +14,13 @@
// $Date$
// $Revision$
#include <boost/mpl/aux_/adl_barrier.hpp>
#include <boost/mpl/aux_/nttp_decl.hpp>
#include <boost/mpl/aux_/config/arrays.hpp>
#include <boost/mpl/aux_/config/msvc.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
namespace aux {
namespace boost { namespace mpl { namespace aux {
typedef char (&no_tag)[1];
typedef char (&yes_tag)[2];
@@ -55,8 +53,6 @@ template<> struct weighted_tag<0>
};
#endif
} // namespace aux
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
}}}
#endif // BOOST_MPL_AUX_YES_NO_HPP_INCLUDED

View File

@@ -27,5 +27,6 @@ template< typename T, T N > struct integral_c;
#endif
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
BOOST_MPL_AUX_ADL_BARRIER_DECL(integral_c)
#endif // BOOST_MPL_INTEGRAL_C_FWD_HPP_INCLUDED

View File

@@ -21,5 +21,6 @@
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
struct integral_c_tag { BOOST_STATIC_CONSTANT(int, value = 0); };
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
BOOST_MPL_AUX_ADL_BARRIER_DECL(integral_c_tag)
#endif // BOOST_MPL_INTEGRAL_C_TAG_HPP_INCLUDED

View File

@@ -22,5 +22,6 @@ BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct long_;
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
BOOST_MPL_AUX_ADL_BARRIER_DECL(long_)
#endif // BOOST_MPL_LONG_FWD_HPP_INCLUDED