![]() |
Home | Libraries | People | FAQ | More |
Resize the string and overwrite its contents.
template<
typename Operation>
constexpr void
resize_and_overwrite(
basic_static_string::size_type n,
Operation op);
Resizes the string to contain n
characters, and uses the provided function object op
to overwrite the string contents. The function object is called with two
arguments: a pointer to the string internal buffer, and the size of the
string. The function object shall return the number of characters written
to the buffer, which shall be less than or equal to n.
The string size is set to the value returned by the function object.
Strong guarantee. However, if an exception is thrown by std::move(op)(p, count), the behavior is undefined.
|
Type |
Thrown On |
|---|---|
|
|
|