diff --git a/include/boost/mpl/arg.hpp b/include/boost/mpl/arg.hpp index 7690f6d..a322f8b 100644 --- a/include/boost/mpl/arg.hpp +++ b/include/boost/mpl/arg.hpp @@ -25,6 +25,7 @@ # include "boost/mpl/arg_fwd.hpp" # include "boost/mpl/void.hpp" # include "boost/mpl/aux_/arity_spec.hpp" +# include "boost/mpl/aux_/arg_typedef.hpp" # include "boost/static_assert.hpp" #endif @@ -95,9 +96,7 @@ template<> struct arg { BOOST_STATIC_CONSTANT(int, value = i); typedef arg next; -#if defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) - typedef void_ tag; -#endif + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< AUX_ARG_N_DEFAULT_PARAMS(typename U, void_) @@ -118,9 +117,7 @@ template<> struct arg template<> struct arg<-1> { BOOST_STATIC_CONSTANT(int, value = -1); -#if defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) - typedef void_ tag; -#endif + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< AUX_ARG_N_DEFAULT_PARAMS(typename U, void_) diff --git a/include/boost/mpl/aux_/arg_typedef.hpp b/include/boost/mpl/aux_/arg_typedef.hpp new file mode 100644 index 0000000..19b6bc0 --- /dev/null +++ b/include/boost/mpl/aux_/arg_typedef.hpp @@ -0,0 +1,28 @@ +//----------------------------------------------------------------------------- +// boost mpl/aux_/arg_typedef.hpp header file +// See http://www.boost.org for updates, documentation, and revision history. +//----------------------------------------------------------------------------- +// +// Copyright (c) 2001-02 +// Aleksey Gurtovoy +// +// Permission to use, copy, modify, distribute and sell this software +// and its documentation for any purpose is hereby granted without fee, +// provided that the above copyright notice appears in all copies and +// that both the copyright notice and this permission notice appear in +// supporting documentation. No representations are made about the +// suitability of this software for any purpose. It is provided "as is" +// without express or implied warranty. + +#ifndef BOOST_MPL_AUX_ARG_TYPEDEF_HPP_INCLUDED +#define BOOST_MPL_AUX_ARG_TYPEDEF_HPP_INCLUDED + +#include "boost/mpl/aux_/config/lambda.hpp" + +#if defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) +# define BOOST_MPL_AUX_ARG_TYPEDEF(T, name) typedef T name; +#else +# define BOOST_MPL_AUX_ARG_TYPEDEF(T, name) /**/ +#endif + +#endif // BOOST_MPL_AUX_ARG_TYPEDEF_HPP_INCLUDED