diff --git a/include/boost/mpl/arg.hpp b/include/boost/mpl/arg.hpp index 960f90a..bda6d4a 100644 --- a/include/boost/mpl/arg.hpp +++ b/include/boost/mpl/arg.hpp @@ -21,8 +21,8 @@ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include -# include # include +# include # include # include #endif @@ -103,7 +103,7 @@ template<> struct arg struct apply { typedef BOOST_PP_CAT(U,i_) type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -121,7 +121,7 @@ template<> struct arg<-1> struct apply { typedef U1 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; diff --git a/include/boost/mpl/aux_/na.hpp b/include/boost/mpl/aux_/na.hpp index 178cfdd..840515b 100644 --- a/include/boost/mpl/aux_/na.hpp +++ b/include/boost/mpl/aux_/na.hpp @@ -19,6 +19,7 @@ #include #include + BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN // n.a. == not available diff --git a/include/boost/mpl/aux_/na_assert.hpp b/include/boost/mpl/aux_/na_assert.hpp new file mode 100644 index 0000000..ec76448 --- /dev/null +++ b/include/boost/mpl/aux_/na_assert.hpp @@ -0,0 +1,33 @@ + +#ifndef BOOST_MPL_AUX_NA_ASSERT_HPP_INCLUDED +#define BOOST_MPL_AUX_NA_ASSERT_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 +#include +#include + +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) +# include +# define BOOST_MPL_AUX_ASSERT_NOT_NA(x) \ + BOOST_MPL_ASSERT_NOT((is_na)) \ +/**/ +#else +# include +# define BOOST_MPL_AUX_ASSERT_NOT_NA(x) \ + BOOST_STATIC_ASSERT(!is_na::value) \ +/**/ +#endif + +#endif // BOOST_MPL_AUX_NA_ASSERT_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/preprocessed/bcc/arg.hpp b/include/boost/mpl/aux_/preprocessed/bcc/arg.hpp index 7a7ebf4..9a766e7 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/arg.hpp @@ -23,7 +23,7 @@ template<> struct arg< -1 > struct apply { typedef U1 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -40,7 +40,7 @@ template<> struct arg<1> struct apply { typedef U1 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -57,7 +57,7 @@ template<> struct arg<2> struct apply { typedef U2 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -74,7 +74,7 @@ template<> struct arg<3> struct apply { typedef U3 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -91,7 +91,7 @@ template<> struct arg<4> struct apply { typedef U4 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -108,7 +108,7 @@ template<> struct arg<5> struct apply { typedef U5 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/arg.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/arg.hpp index 6eaf95d..6f2f8a8 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/arg.hpp @@ -24,7 +24,7 @@ template<> struct arg< -1 > struct apply { typedef U1 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -42,7 +42,7 @@ template<> struct arg<1> struct apply { typedef U1 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -60,7 +60,7 @@ template<> struct arg<2> struct apply { typedef U2 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -78,7 +78,7 @@ template<> struct arg<3> struct apply { typedef U3 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -96,7 +96,7 @@ template<> struct arg<4> struct apply { typedef U4 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -114,7 +114,7 @@ template<> struct arg<5> struct apply { typedef U5 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; diff --git a/include/boost/mpl/aux_/preprocessed/dmc/arg.hpp b/include/boost/mpl/aux_/preprocessed/dmc/arg.hpp index 6eaf95d..6f2f8a8 100644 --- a/include/boost/mpl/aux_/preprocessed/dmc/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/dmc/arg.hpp @@ -24,7 +24,7 @@ template<> struct arg< -1 > struct apply { typedef U1 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -42,7 +42,7 @@ template<> struct arg<1> struct apply { typedef U1 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -60,7 +60,7 @@ template<> struct arg<2> struct apply { typedef U2 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -78,7 +78,7 @@ template<> struct arg<3> struct apply { typedef U3 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -96,7 +96,7 @@ template<> struct arg<4> struct apply { typedef U4 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -114,7 +114,7 @@ template<> struct arg<5> struct apply { typedef U5 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; diff --git a/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp b/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp index 6eaf95d..6f2f8a8 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp @@ -24,7 +24,7 @@ template<> struct arg< -1 > struct apply { typedef U1 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -42,7 +42,7 @@ template<> struct arg<1> struct apply { typedef U1 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -60,7 +60,7 @@ template<> struct arg<2> struct apply { typedef U2 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -78,7 +78,7 @@ template<> struct arg<3> struct apply { typedef U3 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -96,7 +96,7 @@ template<> struct arg<4> struct apply { typedef U4 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -114,7 +114,7 @@ template<> struct arg<5> struct apply { typedef U5 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/arg.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/arg.hpp index 6eaf95d..6f2f8a8 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/arg.hpp @@ -24,7 +24,7 @@ template<> struct arg< -1 > struct apply { typedef U1 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -42,7 +42,7 @@ template<> struct arg<1> struct apply { typedef U1 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -60,7 +60,7 @@ template<> struct arg<2> struct apply { typedef U2 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -78,7 +78,7 @@ template<> struct arg<3> struct apply { typedef U3 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -96,7 +96,7 @@ template<> struct arg<4> struct apply { typedef U4 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -114,7 +114,7 @@ template<> struct arg<5> struct apply { typedef U5 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/arg.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/arg.hpp index 6eaf95d..6f2f8a8 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/arg.hpp @@ -24,7 +24,7 @@ template<> struct arg< -1 > struct apply { typedef U1 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -42,7 +42,7 @@ template<> struct arg<1> struct apply { typedef U1 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -60,7 +60,7 @@ template<> struct arg<2> struct apply { typedef U2 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -78,7 +78,7 @@ template<> struct arg<3> struct apply { typedef U3 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -96,7 +96,7 @@ template<> struct arg<4> struct apply { typedef U4 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -114,7 +114,7 @@ template<> struct arg<5> struct apply { typedef U5 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/arg.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/arg.hpp index 6eaf95d..6f2f8a8 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/arg.hpp @@ -24,7 +24,7 @@ template<> struct arg< -1 > struct apply { typedef U1 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -42,7 +42,7 @@ template<> struct arg<1> struct apply { typedef U1 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -60,7 +60,7 @@ template<> struct arg<2> struct apply { typedef U2 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -78,7 +78,7 @@ template<> struct arg<3> struct apply { typedef U3 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -96,7 +96,7 @@ template<> struct arg<4> struct apply { typedef U4 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -114,7 +114,7 @@ template<> struct arg<5> struct apply { typedef U5 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp index 6eaf95d..6f2f8a8 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp @@ -24,7 +24,7 @@ template<> struct arg< -1 > struct apply { typedef U1 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -42,7 +42,7 @@ template<> struct arg<1> struct apply { typedef U1 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -60,7 +60,7 @@ template<> struct arg<2> struct apply { typedef U2 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -78,7 +78,7 @@ template<> struct arg<3> struct apply { typedef U3 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -96,7 +96,7 @@ template<> struct arg<4> struct apply { typedef U4 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -114,7 +114,7 @@ template<> struct arg<5> struct apply { typedef U5 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp index 6eaf95d..6f2f8a8 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp @@ -24,7 +24,7 @@ template<> struct arg< -1 > struct apply { typedef U1 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -42,7 +42,7 @@ template<> struct arg<1> struct apply { typedef U1 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -60,7 +60,7 @@ template<> struct arg<2> struct apply { typedef U2 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -78,7 +78,7 @@ template<> struct arg<3> struct apply { typedef U3 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -96,7 +96,7 @@ template<> struct arg<4> struct apply { typedef U4 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -114,7 +114,7 @@ template<> struct arg<5> struct apply { typedef U5 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; diff --git a/include/boost/mpl/aux_/preprocessed/plain/arg.hpp b/include/boost/mpl/aux_/preprocessed/plain/arg.hpp index 6eaf95d..6f2f8a8 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/arg.hpp @@ -24,7 +24,7 @@ template<> struct arg< -1 > struct apply { typedef U1 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -42,7 +42,7 @@ template<> struct arg<1> struct apply { typedef U1 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -60,7 +60,7 @@ template<> struct arg<2> struct apply { typedef U2 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -78,7 +78,7 @@ template<> struct arg<3> struct apply { typedef U3 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -96,7 +96,7 @@ template<> struct arg<4> struct apply { typedef U4 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; @@ -114,7 +114,7 @@ template<> struct arg<5> struct apply { typedef U5 type; - BOOST_MPL_ASSERT_NOT((is_na)); + BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; };