Skip to content

Commit

Permalink
Document uses_double_storage(). Refs #37.
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Jun 29, 2023
1 parent 362224a commit e2546b7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/variant2/changelog.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
14 changes: 14 additions & 0 deletions doc/variant2/reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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*/ );
Expand Down Expand Up @@ -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

```
Expand Down

0 comments on commit e2546b7

Please sign in to comment.