is_xxx.hpp 1.2 KB

123456789101112131415161718192021222324252627
  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
  6. # include <boost/config.hpp>
  7. # include <boost/type_traits/integral_constant.hpp>
  8. # include <boost/preprocessor/enum_params.hpp>
  9. # define BOOST_DETAIL_IS_XXX_DEF(name, qualified_name, nargs) \
  10. template <class T> \
  11. struct is_##name : boost::false_type \
  12. { \
  13. }; \
  14. \
  15. template < BOOST_PP_ENUM_PARAMS_Z(1, nargs, class T) > \
  16. struct is_##name< \
  17. qualified_name< BOOST_PP_ENUM_PARAMS_Z(1, nargs, T) > \
  18. > \
  19. : boost::true_type \
  20. { \
  21. };
  22. #endif // BOOST_DETAIL_IS_XXX_DWA20051011_HPP