1 // Copyright David Abrahams 2003.
2 // Distributed under the Boost Software License, Version 1.0. (See
3 // accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
5 #ifndef VALUE_IS_XXX_DWA2003224_HPP
6 # define VALUE_IS_XXX_DWA2003224_HPP
7 
8 # include <boost/config.hpp>
9 # include <boost/mpl/bool.hpp>
10 # include <boost/preprocessor/enum_params.hpp>
11 
12 # include <boost/python/detail/type_traits.hpp>
13 #  include <boost/python/detail/is_xxx.hpp>
14 
15 namespace boost { namespace python { namespace detail {
16 
17 #  define BOOST_PYTHON_VALUE_IS_XXX_DEF(name, qualified_name, nargs)    \
18 template <class X_>                                                     \
19 struct value_is_##name                                                  \
20 {                                                                       \
21     BOOST_PYTHON_IS_XXX_DEF(name,qualified_name,nargs)                  \
22     BOOST_STATIC_CONSTANT(bool, value = is_##name<                      \
23                                typename remove_cv<                      \
24                                   typename remove_reference<X_>::type   \
25                                >::type                                  \
26                            >::value);                                   \
27     typedef mpl::bool_<value> type;                                     \
28                                                                         \
29 };
30 
31 }}} // namespace boost::python::detail
32 
33 #endif // VALUE_IS_XXX_DWA2003224_HPP
34