mirror of
https://github.com/boostorg/variant2.git
synced 2025-07-30 20:27:17 +02:00
Document uses_double_storage(). Refs #37.
This commit is contained in:
@ -8,6 +8,10 @@ https://www.boost.org/LICENSE_1_0.txt
|
||||
# Revision History
|
||||
:idprefix: changelog_
|
||||
|
||||
## Changes in 1.83.0
|
||||
|
||||
* Added `uses_double_storage()`.
|
||||
|
||||
## Changes in 1.81.0
|
||||
|
||||
* Added support for `boost::json::value_from` and `boost::json::value_to`.
|
||||
|
@ -250,6 +250,8 @@ public:
|
||||
constexpr bool valueless_by_exception() const noexcept;
|
||||
constexpr size_t index() const noexcept;
|
||||
|
||||
static constexpr bool uses_double_storage() noexcept;
|
||||
|
||||
// swap
|
||||
|
||||
void swap( variant& r ) noexcept( /*see below*/ );
|
||||
@ -570,6 +572,18 @@ constexpr size_t index() const noexcept;
|
||||
Returns: ::
|
||||
The zero-based index of the active alternative.
|
||||
|
||||
```
|
||||
static constexpr bool uses_double_storage() noexcept;
|
||||
```
|
||||
[none]
|
||||
* {blank}
|
||||
+
|
||||
Returns: ::
|
||||
`true` if the variant uses double storage to meet the never valueless
|
||||
guarantee because one of the alternatives is not nothrow move constructible,
|
||||
and `false` otherwise.
|
||||
|
||||
|
||||
#### Swap
|
||||
|
||||
```
|
||||
|
Reference in New Issue
Block a user