fix#2417
This improves inter-conversion between string_view implementations. Some observable differences for users:
- core::string_view no longer supports the .to_string() or .clear() extensions from Utility
- code that relied on .max_size() returning .size(), needs to be fixed to .size() instead
- remove_suffix() and remove_prefix() were more lenient than the standard specs; be sure you don't rely on it clamping the argument to valid range
- BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS no longer suppresses conversions to std::string
- core::string_view adds .contains() and various bugs fixed
API Changes:
`string_param`, which was previously the argument type when setting field values
has been replaced by `string_view`. Because of this, it is no longer possible to
set message field values directly as integrals.
Users are required to convert numeric arguments to a string type prior to calling
`fields::set` et. al.
Beast provides the non-allocating `to_static_string()` function for this purpose.
To set Content-Length field manually, call `message::content_length`.
fixes#1956
API Changes:
The file `core/buffers_adapter.hpp` has been removed along with the deprecated
alias typename `buffers_adapter`. Affected programs should use
`core/buffers_adapator.hpp` and the type `buffers_adaptor`.
refs #1934
API Changes:
The core/type_traits.hpp public header has been removed and along with it
the type trait is_completion_handler. Beast uses the CompletionHandler correctness
checks provided by Asio. In a c++20 environment, these convert to concept checks.
API Changes:
* Code that depends on mutable_data_type should be refactored to use
mutable_buffers_type. Classes affected are:
- buffers_adaptor
- flat_buffer
- flat_static_buffer
- multi_buffer
- static_buffer
refs #1934
API Changes:
basic_stream::expires_after used to take a nanosecond duration type argument. This
required users on systems where the steady_clock::duration_type was less accurate
to explicity duration_cast when calling this function, making code non-portable.
The duration type is now that of the embedded steady_clock.
Many thanks to @spdw for noticing this and providing a patch.
fixes#1943closes#1960
fix#1853, close#1859, close#1866
After calling the DynamicBuffer commit() function the
buffer returned from prepare() can be invalidated but
the ostream kept using it.