repeated_one_of1.hpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef BOOST_METAPARSE_V1_CPP98_REPEATED_ONE_OF1_HPP
  2. #define BOOST_METAPARSE_V1_CPP98_REPEATED_ONE_OF1_HPP
  3. // Copyright Abel Sinkovics (abel@sinkovics.hu) 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/limit_one_of_size.hpp>
  8. #include <boost/metaparse/v1/cpp98/impl/one_of.hpp>
  9. #include <boost/metaparse/v1/repeated1.hpp>
  10. #include <boost/mpl/vector.hpp>
  11. #include <boost/preprocessor/repetition/enum_params.hpp>
  12. #include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
  13. namespace boost
  14. {
  15. namespace metaparse
  16. {
  17. namespace v1
  18. {
  19. template <
  20. BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
  21. BOOST_METAPARSE_LIMIT_ONE_OF_SIZE,
  22. class P,
  23. boost::mpl::na
  24. )
  25. >
  26. struct repeated_one_of1 :
  27. repeated1<
  28. impl::one_of<
  29. boost::mpl::vector<
  30. BOOST_PP_ENUM_PARAMS(BOOST_METAPARSE_LIMIT_ONE_OF_SIZE, P)
  31. >
  32. >
  33. >
  34. {};
  35. }
  36. }
  37. }
  38. #endif