static_string.hpp 909 B

123456789101112131415161718192021222324252627282930313233343536
  1. //
  2. // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
  3. //
  4. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. // Official repository: https://github.com/boostorg/beast
  8. //
  9. #ifndef BOOST_BEAST_STATIC_STRING_HPP
  10. #define BOOST_BEAST_STATIC_STRING_HPP
  11. #include <boost/beast/core/detail/static_string.hpp>
  12. #include <boost/static_string/static_string.hpp>
  13. namespace boost {
  14. namespace beast {
  15. template<std::size_t N,
  16. class CharT = char,
  17. class Traits = std::char_traits<CharT> >
  18. using static_string = boost::static_strings::basic_static_string<N, CharT,
  19. Traits>;
  20. template<class Integer>
  21. inline auto
  22. to_static_string(Integer x)
  23. -> decltype(boost::static_strings::to_static_string(x))
  24. {
  25. return boost::static_strings::to_static_string(x);
  26. }
  27. } // beast
  28. } // boost
  29. #endif