Update contrib.
     1 // Copyright David Abrahams 2005. Distributed under the Boost
 
     2 // Software License, Version 1.0. (See accompanying
 
     3 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
     4 #ifndef BOOST_DETAIL_IS_XXX_DWA20051011_HPP
 
     5 # define BOOST_DETAIL_IS_XXX_DWA20051011_HPP
 
     7 # include <boost/config.hpp>
 
     8 # include <boost/mpl/bool.hpp>
 
     9 # include <boost/preprocessor/enum_params.hpp>
 
    11 # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
 
    12 # include <boost/type_traits/is_reference.hpp>
 
    13 # include <boost/type_traits/add_reference.hpp>
 
    15 #  define BOOST_DETAIL_IS_XXX_DEF(name, qualified_name, nargs)          \
 
    20     typedef char (&no)[2];                                              \
 
    22     static typename add_reference<X_>::type dummy;                      \
 
    26         template < BOOST_PP_ENUM_PARAMS_Z(1, nargs, class U) >          \
 
    28            qualified_name< BOOST_PP_ENUM_PARAMS_Z(1, nargs, U) >&, int  \
 
    32         static no test(U&, ...);                                        \
 
    35     BOOST_STATIC_CONSTANT(                                              \
 
    37         = !is_reference<X_>::value                                      \
 
    38         & (sizeof(helpers::test(dummy, 0)) == sizeof(yes)));            \
 
    40     typedef mpl::bool_<value> type;                                     \
 
    45 #  define BOOST_DETAIL_IS_XXX_DEF(name, qualified_name, nargs)  \
 
    47 struct is_##name : mpl::false_                                  \
 
    51 template < BOOST_PP_ENUM_PARAMS_Z(1, nargs, class T) >          \
 
    53    qualified_name< BOOST_PP_ENUM_PARAMS_Z(1, nargs, T) >        \
 
    61 #endif // BOOST_DETAIL_IS_XXX_DWA20051011_HPP