assert_string_length.hpp 673 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef BOOST_METAPARSE_V1_IMPL_ASSERT_STRING_LENGTH_HPP
  2. #define BOOST_METAPARSE_V1_IMPL_ASSERT_STRING_LENGTH_HPP
  3. // Copyright Abel Sinkovics (abel@sinkovics.hu) 2014.
  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/static_assert.hpp>
  8. namespace boost
  9. {
  10. namespace metaparse
  11. {
  12. namespace v1
  13. {
  14. namespace impl
  15. {
  16. template <int Len, class S>
  17. struct assert_string_length : S
  18. {
  19. BOOST_STATIC_ASSERT((Len <= BOOST_METAPARSE_LIMIT_STRING_SIZE));
  20. };
  21. }
  22. }
  23. }
  24. }
  25. #endif