static_string.hpp 903 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 BHO_BEAST_STATIC_STRING_HPP
  10. #define BHO_BEAST_STATIC_STRING_HPP
  11. #include <asio2/bho/beast/core/detail/static_string.hpp>
  12. #include <asio2/bho/static_string/static_string.hpp>
  13. namespace bho {
  14. namespace beast {
  15. template<std::size_t N,
  16. class CharT = char,
  17. class Traits = std::char_traits<CharT> >
  18. using static_string = bho::static_strings::basic_static_string<N, CharT,
  19. Traits>;
  20. template<class Integer>
  21. inline auto
  22. to_static_string(Integer x)
  23. -> decltype(bho::static_strings::to_static_string(x))
  24. {
  25. return bho::static_strings::to_static_string(x);
  26. }
  27. } // beast
  28. } // bho
  29. #endif