push_front_c.hpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef BOOST_METAPARSE_V1_CPP98_IMPL_PUSH_FRONT_C_HPP
  2. #define BOOST_METAPARSE_V1_CPP98_IMPL_PUSH_FRONT_C_HPP
  3. // Copyright Abel Sinkovics (abel@sinkovics.hu) 2013.
  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/fwd/string.hpp>
  8. #include <boost/preprocessor/arithmetic/dec.hpp>
  9. #include <boost/preprocessor/repetition/enum_params.hpp>
  10. namespace boost
  11. {
  12. namespace metaparse
  13. {
  14. namespace v1
  15. {
  16. namespace impl
  17. {
  18. template <class S, char C>
  19. struct push_front_c;
  20. template <
  21. BOOST_PP_ENUM_PARAMS(BOOST_METAPARSE_LIMIT_STRING_SIZE, int C),
  22. char Ch
  23. >
  24. struct push_front_c<
  25. string<BOOST_PP_ENUM_PARAMS(BOOST_METAPARSE_LIMIT_STRING_SIZE, C)>,
  26. Ch
  27. > :
  28. string<
  29. Ch,
  30. BOOST_PP_ENUM_PARAMS(
  31. BOOST_PP_DEC(BOOST_METAPARSE_LIMIT_STRING_SIZE),
  32. C
  33. )
  34. >
  35. {};
  36. }
  37. }
  38. }
  39. }
  40. #endif