2 // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
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)
7 // Official repository: https://github.com/boostorg/beast
10 #ifndef BOOST_BEAST_IMPL_STRING_PARAM_IPP
11 #define BOOST_BEAST_IMPL_STRING_PARAM_IPP
17 typename std::enable_if<
18 std::is_integral<T>::value>::type
22 auto const last = buf_ + sizeof(buf_);
23 auto const it = detail::raw_to_string<
24 char, T, std::char_traits<char>>(
25 last, sizeof(buf_), t);
26 sv_ = {it, static_cast<std::size_t>(
31 typename std::enable_if<
32 ! std::is_integral<T>::value &&
33 ! std::is_convertible<T, string_view>::value
38 os_.emplace(buf_, sizeof(buf_));
53 typename std::enable_if<
54 std::is_integral<T>::value>::type
58 char buf[detail::max_digits(sizeof(T))];
59 auto const last = buf + sizeof(buf);
60 auto const it = detail::raw_to_string<
61 char, T, std::char_traits<char>>(
62 last, sizeof(buf), t);
63 *os_ << string_view{it,
64 static_cast<std::size_t>(last - it)};
68 typename std::enable_if<
69 ! std::is_integral<T>::value>::type
76 template<class T0, class... TN>
79 print_n(T0 const& t0, TN const&... tn)
85 template<class T0, class T1, class... TN>
88 print(T0 const& t0, T1 const& t1, TN const&... tn)
90 os_.emplace(buf_, sizeof(buf_));
98 template<class... Args>
100 string_param(Args const&... args)