diff options
Diffstat (limited to 'boost/parameter/aux_/pack/unmatched_argument.hpp')
-rw-r--r-- | boost/parameter/aux_/pack/unmatched_argument.hpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/boost/parameter/aux_/pack/unmatched_argument.hpp b/boost/parameter/aux_/pack/unmatched_argument.hpp new file mode 100644 index 0000000000..72a1bc5f62 --- /dev/null +++ b/boost/parameter/aux_/pack/unmatched_argument.hpp @@ -0,0 +1,41 @@ +// Copyright David Abrahams, Daniel Wallin 2003. +// 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) + +#ifndef BOOST_PARAMETER_AUX_PACK_UNMATCHED_ARGUMENT_HPP +#define BOOST_PARAMETER_AUX_PACK_UNMATCHED_ARGUMENT_HPP + +#include <boost/parameter/config.hpp> + +#if defined(BOOST_PARAMETER_CAN_USE_MP11) +#include <type_traits> +#else +#include <boost/mpl/bool.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/assert.hpp> +#include <boost/type_traits/is_same.hpp> +#endif + +namespace boost { namespace parameter { namespace aux { + + template <typename T> + struct unmatched_argument + { +#if defined(BOOST_PARAMETER_CAN_USE_MP11) + static_assert(::std::is_same<T,void>::value, "T == void"); +#else + BOOST_MPL_ASSERT(( + typename ::boost::mpl::if_< + ::boost::is_same<T,void> + , ::boost::mpl::true_ + , ::boost::mpl::false_ + >::type + )); +#endif + typedef int type; + }; +}}} // namespace boost::parameter::aux + +#endif // include guard + |