pop_back.hpp 925 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef BOOST_METAPARSE_V1_CPP98_IMPL_POP_BACK_HPP
  2. #define BOOST_METAPARSE_V1_CPP98_IMPL_POP_BACK_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/metaparse/v1/cpp98/impl/push_front_c.hpp>
  9. #include <boost/metaparse/v1/cpp98/impl/size.hpp>
  10. #include <boost/metaparse/v1/cpp98/impl/update_c.hpp>
  11. namespace boost
  12. {
  13. namespace metaparse
  14. {
  15. namespace v1
  16. {
  17. namespace impl
  18. {
  19. template <class S>
  20. struct pop_back;
  21. template <class S>
  22. struct pop_back :
  23. update_c<
  24. typename S::type,
  25. size<typename S::type>::type::value - 1,
  26. BOOST_NO_CHAR
  27. >
  28. {};
  29. }
  30. }
  31. }
  32. }
  33. #endif