2
0
mirror of https://github.com/boostorg/uuid.git synced 2026-01-19 04:42:16 +00:00

Update documentation

This commit is contained in:
Peter Dimov
2026-01-10 02:40:01 +02:00
parent 8febad40ed
commit 2b229f7449

View File

@@ -14,8 +14,8 @@ struct string_generator
{ {
using result_type = uuid; using result_type = uuid;
template<class Ch, class Traits, class Alloc> template<class Str>
constexpr uuid operator()( std::basic_string<Ch, Traits, Alloc> const& s ) const; constexpr uuid operator()( Str const& s ) const;
template<class Ch> template<class Ch>
constexpr uuid operator()( Ch const* s ) const; constexpr uuid operator()( Ch const* s ) const;
@@ -55,11 +55,14 @@ hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
Invalid input will generate a `std::runtime_error` exception. Invalid input will generate a `std::runtime_error` exception.
``` ```
template<class Ch, class Traits, class Alloc> template<class Str>
constexpr uuid operator()( std::basic_string<Ch, Traits, Alloc> const& s ) const; constexpr uuid operator()( Str const& s ) const;
``` ```
Requires: :: The character type `Ch` of `s` must be one of `char`, `wchar_t`, `char8_t`, `char16_t`, `char32_t`. Requires: ::
`Str` must be a _string-like_ type; that is, one with a nested `value_type` type (`Ch`) and with a nested `traits_type` type.
`str.data()` must return `Ch const*`. `str.data() + str.size()` must be of type `Ch const*`.
`Ch` must be a character type (one of `char`, `wchar_t`, `char8_t`, `char16_t`, `char32_t`).
Effects: :: Parses the string `s` into a `uuid` and returns the result. Effects: :: Parses the string `s` into a `uuid` and returns the result.