mirror of
https://github.com/boostorg/beast.git
synced 2025-08-01 05:44:38 +02:00
Constrain to_static_string to integers
This commit is contained in:
@@ -2,6 +2,7 @@ Version 231:
|
||||
|
||||
* Doc section names are stable
|
||||
* Add missing include
|
||||
* Constrain to_static_string to integers
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
@@ -617,7 +617,7 @@ to_static_string(Integer x, std::false_type)
|
||||
|
||||
} // detail
|
||||
|
||||
template<class Integer>
|
||||
template<class Integer, class>
|
||||
static_string<detail::max_digits(sizeof(Integer))>
|
||||
to_static_string(Integer x)
|
||||
{
|
||||
|
@@ -1097,7 +1097,13 @@ operator<<(std::basic_ostream<CharT, Traits>& os,
|
||||
maximum size large enough to hold the longest possible decimal
|
||||
representation of any integer of the given type.
|
||||
*/
|
||||
template<class Integer>
|
||||
template<
|
||||
class Integer
|
||||
#ifndef BOOST_BEAST_DOXYGEN
|
||||
,class = typename std::enable_if<
|
||||
std::is_integral<Integer>::value>::type
|
||||
#endif
|
||||
>
|
||||
static_string<detail::max_digits(sizeof(Integer))>
|
||||
to_static_string(Integer x);
|
||||
|
||||
|
Reference in New Issue
Block a user