|
| Value () noexcept=default |
| Construct a Null value.
|
|
| Value (Null) noexcept |
| Construct a Null value.
|
|
| Value (std::nullptr_t) noexcept |
| Construct a Null value.
|
|
| Value (Boolean value) noexcept |
| Construct a Boolean value with the given underlying value.
|
|
| Value (const String &value) |
| Construct a String value with the given underlying value.
|
|
| Value (String &&value) noexcept |
| Construct a String value from the given underlying value.
|
|
| Value (const char *value) |
| Construct a String value with the given underlying value.
|
|
| Value (std::string_view value) |
| Construct a String value with the given underlying value.
|
|
| Value (const char8_t *value) |
| Construct a String value with the given underlying value.
|
|
| Value (std::u8string_view value) |
| Construct a String value with the given underlying value.
|
|
| Value (detail::number auto value) noexcept |
| Construct a Number value with the given underlying value.
|
|
| Value (const Object &value) |
| Construct an Object value with the given underlying value.
|
|
| Value (Object &&value) noexcept |
| Construct an Object value from the given underlying value.
|
|
| Value (const Array &value) |
| Construct an Array value with the given underlying value.
|
|
| Value (Array &&value) noexcept |
| Construct an Array value from the given underlying value.
|
|
std::string | toString (const SerializationOptions &options={}) const |
| Get a JSON string representation of the value.
|
|
bool | operator== (const Value &other) const |
| Compare this value to another for equality.
|
|
std::partial_ordering | operator<=> (const Value &other) const |
| Compare this value to another.
|
|
constexpr | Variant () noexcept(std::is_nothrow_default_constructible_v< variant_alternative_t< 0, Variant > >) |
| Default-construct a variant with the first variant alternative, if it is default-constructible.
|
|
constexpr | Variant (U &&value) noexcept(std::is_nothrow_constructible_v< decltype(F(std::forward< U >(value)))>) |
| Converting constructor.
|
|
constexpr | Variant (std::in_place_type_t< T > type, Args &&... args) |
| Construct a variant alternative in-place given its type.
|
|
constexpr | Variant (std::in_place_type_t< T > type, std::initializer_list< U > ilist, Args &&... args) |
| Construct a variant alternative in-place given its type, with an initializer list as the first constructor argument.
|
|
constexpr | Variant (std::in_place_index_t< Index > index, Args &&... args) |
| Construct a variant alternative in-place given its index.
|
|
constexpr | Variant (std::in_place_index_t< Index > index, std::initializer_list< U > ilist, Args &&... args) |
| Construct a variant alternative in-place given its index, with an initializer list as the first constructor argument.
|
|
constexpr | Variant (const Variant &other)=delete |
| Deleted copy constructor.
|
|
constexpr | Variant (const Variant &other)=default |
| Trivial copy constructor.
|
|
constexpr | Variant (const Variant &other) |
| Copy constructor.
|
|
constexpr | Variant (Variant &&other) noexcept=default |
| Trivial move constructor.
|
|
constexpr | Variant (Variant &&other) noexcept((std::is_nothrow_move_constructible_v< Ts > &&...)) |
| Move constructor.
|
|
constexpr | ~Variant () |
| Destructor.
|
|
constexpr | ~Variant ()=default |
| Trivial destructor.
|
|
constexpr Variant & | operator= (const Variant &other)=delete |
| Deleted copy assignment.
|
|
constexpr Variant & | operator= (const Variant &other)=default |
| Trivial copy assignment.
|
|
constexpr Variant & | operator= (const Variant &other) |
| Copy assignment.
|
|
constexpr Variant & | operator= (Variant &&other) noexcept=default |
| Trivial move assignment.
|
|
constexpr Variant & | operator= (Variant &&other) noexcept(((std::is_nothrow_move_constructible_v< Ts > &&//NOLINT(performance-noexcept-move-constructor, cppcoreguidelines-noexcept-move-operations) std::is_nothrow_move_assignable_v< Ts >) &&...)) |
| Move assignment.
|
|
constexpr Variant & | operator= (U &&value) noexcept(std::is_nothrow_assignable_v< decltype(F(std::forward< U >(value)))&, U > &&std::is_nothrow_constructible_v< decltype(F(std::forward< U >(value))), U >) |
| Converting assignment.
|
|
constexpr T & | emplace (Args &&... args) |
| Construct an alternative given its type, destroying the old value.
|
|
constexpr T & | emplace (std::initializer_list< U > ilist, Args &&... args) |
| Construct an alternative given its type, with an initializer list as the first constructor argument, destroying the old value.
|
|
constexpr variant_alternative_t< Index, Variant > & | emplace (Args &&... args) |
| Construct an alternative given its index, destroying the old value.
|
|
constexpr variant_alternative_t< Index, Variant > & | emplace (std::initializer_list< U > ilist, Args &&... args) |
| Construct an alternative given its index, with an initializer list as the first constructor argument, destroying the old value.
|
|
constexpr void | swap (Variant &other) noexcept(((std::is_nothrow_move_constructible_v< Ts > &&std::is_nothrow_swappable_v< Ts >) &&...)) |
| Swap this variant's value with that of another.
|
|
constexpr index_type | index () const noexcept |
| Get the alternative index of the currently active value held by the variant.
|
|
constexpr bool | valueless_by_exception () const noexcept |
| Check if the variant is in the valueless by exception state.
|
|
constexpr bool | is () const noexcept |
| Check if the variant currently holds the alternative with the given type.
|
|
constexpr bool | is () const noexcept |
| Check if the variant currently holds the alternative with the given index.
|
|
constexpr T & | as () &noexcept |
| Access the underlying value with the given type without a safety check.
|
|
constexpr const T & | as () const &noexcept |
| Access the underlying value with the given type without a safety check.
|
|
constexpr T && | as () &&noexcept |
| Access the underlying value with the given type without a safety check.
|
|
constexpr const T && | as () const &&noexcept |
| Access the underlying value with the given type without a safety check.
|
|
constexpr variant_alternative_t< Index, Variant > & | as () &noexcept |
| Access the underlying value with the given index without a safety check.
|
|
constexpr const variant_alternative_t< Index, Variant > & | as () const &noexcept |
| Access the underlying value with the given index without a safety check.
|
|
constexpr variant_alternative_t< Index, Variant > && | as () &&noexcept |
| Access the underlying value with the given index without a safety check.
|
|
constexpr const variant_alternative_t< Index, Variant > && | as () const &&noexcept |
| Access the underlying value with the given index without a safety check.
|
|
constexpr T & | get () & |
| Access the underlying value with the given type.
|
|
constexpr const T & | get () const & |
| Access the underlying value with the given type.
|
|
constexpr T && | get () && |
| Access the underlying value with the given type.
|
|
constexpr const T && | get () const && |
| Access the underlying value with the given type.
|
|
constexpr variant_alternative_t< Index, Variant > & | get () & |
| Access the underlying value with the given index.
|
|
constexpr const variant_alternative_t< Index, Variant > & | get () const & |
| Access the underlying value with the given index.
|
|
constexpr variant_alternative_t< Index, Variant > && | get () && |
| Access the underlying value with the given index.
|
|
constexpr const variant_alternative_t< Index, Variant > && | get () const && |
| Access the underlying value with the given index.
|
|
constexpr T * | get_if () noexcept |
| Access the underlying value with the given type if it is the currently active alternative.
|
|
constexpr const T * | get_if () const noexcept |
| Access the underlying value with the given type if it is the currently active alternative.
|
|
constexpr variant_alternative_t< Index, Variant > * | get_if () noexcept |
| Access the underlying value with the given index if it is the currently active alternative.
|
|
constexpr const variant_alternative_t< Index, Variant > * | get_if () const noexcept |
| Access the underlying value with the given index if it is the currently active alternative.
|
|
JSON value type.
Holds a value of one of the following types: