sequence_apply.hpp 850 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef BOOST_METAPARSE_SEQUENCE_APPLY_HPP
  2. #define BOOST_METAPARSE_SEQUENCE_APPLY_HPP
  3. // Copyright Abel Sinkovics (abel@sinkovics.hu) 2015.
  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/sequence_apply.hpp>
  8. #include <boost/preprocessor/repetition/repeat_from_to.hpp>
  9. #include <boost/preprocessor/cat.hpp>
  10. namespace boost
  11. {
  12. namespace metaparse
  13. {
  14. #ifdef BOOST_METAPARSE_USING
  15. # error BOOST_METAPARSE_USING already defined
  16. #endif
  17. #define BOOST_METAPARSE_USING(z, n, unused) \
  18. using BOOST_PP_CAT(v1::sequence_apply, n);
  19. BOOST_PP_REPEAT_FROM_TO(
  20. 1,
  21. BOOST_METAPARSE_LIMIT_SEQUENCE_SIZE,
  22. BOOST_METAPARSE_USING,
  23. ~
  24. )
  25. #undef BOOST_METAPARSE_USING
  26. }
  27. }
  28. #endif