size.hpp 702 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef BOOST_METAPARSE_V1_CPP11_IMPL_SIZE_HPP
  2. #define BOOST_METAPARSE_V1_CPP11_IMPL_SIZE_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/cpp11/fwd/string.hpp>
  8. #include <boost/mpl/int.hpp>
  9. #include <type_traits>
  10. namespace boost
  11. {
  12. namespace metaparse
  13. {
  14. namespace v1
  15. {
  16. namespace impl
  17. {
  18. template <class S>
  19. struct size;
  20. template <char... Cs>
  21. struct size<string<Cs...>> : boost::mpl::int_<sizeof...(Cs)> {};
  22. }
  23. }
  24. }
  25. }
  26. #endif