mirror of
https://github.com/boostorg/uuid.git
synced 2026-01-19 04:42:16 +00:00
Accept Ch[36] in to_chars because these uses did compile
This commit is contained in:
@@ -179,7 +179,7 @@ to_chars( u, buf );
|
||||
std::cout << buf << std::endl;
|
||||
```
|
||||
|
||||
NOTE: As a special exception, `N` is allowed to be 36 when `Ch` is `char`.
|
||||
NOTE: As a special exception, `N` is allowed to be 36.
|
||||
In this case, the function writes exactly 36 characters into `buffer` and does not write a null terminator.
|
||||
This use is only supported for backward compatibility and is deprecated.
|
||||
Use a buffer of 37 characters instead, to allow for the null terminator.
|
||||
|
||||
@@ -60,8 +60,9 @@ inline Ch* to_chars( uuid const& u, Ch (&buffer)[ N ] ) noexcept
|
||||
}
|
||||
|
||||
// only provided for compatibility; deprecated
|
||||
BOOST_DEPRECATED( "Use char[37] instead of char[36] to allow for the null terminator" )
|
||||
inline char* to_chars( uuid const& u, char (&buffer)[ 36 ] ) noexcept
|
||||
template<class Ch>
|
||||
BOOST_DEPRECATED( "Use Ch[37] instead of Ch[36] to allow for the null terminator" )
|
||||
inline Ch* to_chars( uuid const& u, Ch (&buffer)[ 36 ] ) noexcept
|
||||
{
|
||||
detail::to_chars( u, buffer + 0 );
|
||||
return buffer + 36;
|
||||
|
||||
Reference in New Issue
Block a user