forked from boostorg/static_string
Removed the ability to disable exceptions in config and the null terminator optimization from master
This commit is contained in:
@ -76,14 +76,13 @@ The over-arching design goal is to resemble the interface and behavior of
|
||||
maximum allowed size of the string, `std::length_error` is thrown if exceptions are enabled. All
|
||||
algorithms which throw exceptions provide the strong exception safety
|
||||
guarantee. This is intended to be a drop in replacement for `std::string`.
|
||||
All the operations for `static_string` work when the source is within the string itself.
|
||||
All the operations for `static_string` work when the source of the operation is within
|
||||
the string iteslf.
|
||||
|
||||
The API of `static_string` only diverges from `std::string` in few places,
|
||||
being `substr` for which this implementation returns a string view instead of `static_string`,
|
||||
and certain functions that will never throw are marked as `noexcept`, which diverges from
|
||||
those of `std::string`. Every function that is in the C++20 specification of `std::string` is
|
||||
present in this implementation, with the only difference being the lack of `constexpr`
|
||||
for the time being. The avaliable overloads for `static_string` are identical to those
|
||||
those of `std::string`. The avaliable overloads for `static_string` are identical to those
|
||||
of `std::string`.
|
||||
|
||||
[/-----------------------------------------------------------------------------]
|
||||
@ -105,8 +104,6 @@ Depending on the character type and size used for a specialization of `static_st
|
||||
|
||||
* Otherwise, the type of the member used to store the size of the `static_string` will be the smallest standard unsigned integer type that can represent the value `N`.
|
||||
|
||||
The optionally enabled null-terminator optimization will instead store the size of the `static_string` in the last character of the data array as `N - size()` if `CharT` can represent the value `N`.
|
||||
|
||||
[/-----------------------------------------------------------------------------]
|
||||
|
||||
[heading Configuration]
|
||||
@ -115,10 +112,6 @@ Certain features can be enabled and disabled though defining configuration macro
|
||||
|
||||
* `BOOST_STATIC_STRING_STANDALONE`: When defined, the library is put into standalone mode.
|
||||
|
||||
* `BOOST_STATIC_STRING_NO_EXCEPTIONS`: When defined, exceptions and their associated checks are disabled. This causes violations of preconditions to result in undefined behavior.
|
||||
|
||||
* `BOOST_STATIC_STRING_NULL_OPTIMIZATION`: When defined, the `static_string` will use the null-terminator optimization.
|
||||
|
||||
[/-----------------------------------------------------------------------------]
|
||||
|
||||
[heading Reference]
|
||||
|
@ -14,12 +14,6 @@
|
||||
// Are we dependent on Boost?
|
||||
// #define BOOST_STATIC_STRING_STANDALONE
|
||||
|
||||
// Disable exceptions and their associated checks
|
||||
// #define BOOST_STATIC_STRING_NO_EXCEPTIONS
|
||||
|
||||
// Opt-in to the null terminator optimization
|
||||
// #define BOOST_STATIC_STRING_NULL_OPTIMIZATION
|
||||
|
||||
// Can we have deduction guides?
|
||||
#if __cpp_deduction_guides >= 201703L
|
||||
#define BOOST_STATIC_STRING_USE_DEDUCT
|
||||
@ -104,14 +98,6 @@
|
||||
#define BOOST_STATIC_STRING_CPP11_CONSTEXPR constexpr
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_STATIC_STRING_NO_EXCEPTIONS
|
||||
#define BOOST_STATIC_STRING_NO_EXCEPTIONS_NOEXCEPT noexcept
|
||||
#define BOOST_STATIC_STRING_THROW_IF(cond, ex)
|
||||
#define BOOST_STATIC_STRING_THROW(ex)
|
||||
#else
|
||||
#define BOOST_STATIC_STRING_NO_EXCEPTIONS_NOEXCEPT
|
||||
#endif
|
||||
|
||||
// Boost and non-Boost versions of utilities
|
||||
#ifndef BOOST_STATIC_STRING_STANDALONE
|
||||
#ifndef BOOST_STATIC_STRING_THROW_IF
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user