one_of.hpp 1019 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef BOOST_METAPARSE_V1_CPP98_ONE_OF_HPP
  2. #define BOOST_METAPARSE_V1_CPP98_ONE_OF_HPP
  3. // Copyright Abel Sinkovics (abel@sinkovics.hu) 2009 - 2010.
  4. // Distributed under the Boost Software License, Version 1.0.
  5. // (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. #include <boost/metaparse/v1/cpp98/impl/one_of.hpp>
  8. #include <boost/metaparse/limit_one_of_size.hpp>
  9. #include <boost/mpl/vector.hpp>
  10. #include <boost/preprocessor/repetition/enum_params.hpp>
  11. #include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
  12. namespace boost
  13. {
  14. namespace metaparse
  15. {
  16. namespace v1
  17. {
  18. template <
  19. BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
  20. BOOST_METAPARSE_LIMIT_ONE_OF_SIZE,
  21. class P,
  22. boost::mpl::na
  23. )
  24. >
  25. struct one_of :
  26. impl::one_of<
  27. boost::mpl::vector<
  28. BOOST_PP_ENUM_PARAMS(BOOST_METAPARSE_LIMIT_ONE_OF_SIZE, P)
  29. >
  30. >
  31. {};
  32. }
  33. }
  34. }
  35. #endif