nth_of.hpp 971 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef BOOST_METAPARSE_V1_CPP98_NTH_OF_HPP
  2. #define BOOST_METAPARSE_V1_CPP98_NTH_OF_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/v1/nth_of_c.hpp>
  8. #include <boost/metaparse/limit_sequence_size.hpp>
  9. #include <boost/preprocessor/repetition/enum_params.hpp>
  10. #include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
  11. namespace boost
  12. {
  13. namespace metaparse
  14. {
  15. namespace v1
  16. {
  17. template <
  18. class K,
  19. BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
  20. BOOST_METAPARSE_LIMIT_SEQUENCE_SIZE,
  21. class P,
  22. boost::mpl::na
  23. )
  24. >
  25. struct nth_of :
  26. nth_of_c<
  27. K::type::value,
  28. BOOST_PP_ENUM_PARAMS(BOOST_METAPARSE_LIMIT_SEQUENCE_SIZE, P)
  29. >
  30. {};
  31. }
  32. }
  33. }
  34. #endif