Value‐semantic wrapper that adds a null state to TYPE.
Synopsis
Declared in <bdlb_nullablevalue.h>
template<class TYPE>
class NullableValue
: public bsl::optional<TYPE>
Description
This template class extends the set of values of its value‐semantic TYPE parameter to include the notion of a "null" value. If TYPE is fully value‐semantic, then the augmented type NullableValue<TYPE> will be as well. In addition to supporting all homogeneous value‐semantic operations, conversions between comparable underlying value types is also supported. Two nullable objects with different underlying types compare equal if their underlying types are comparable and either (1) both objects are null or (2) the non‐null values compare equal. A null nullable object is considered ordered before any non‐null nullable object. Attempts to copy construct, copy assign, or compare incompatible values types will fail to compile. The NullableValue template cannot be instantiated on an incomplete type, a type that overloads unary operator&, or bsl::nullopt_t.
Base Classes
Name |
Description |
Allocator‐aware nullable wrapper for an object of type |
Type Aliases
Name |
Description |
Base class of this type. |
|
|
|
Allocator type used by this object. |
|
Alias for the managed object type of this optional. |
Member Functions
Name |
Description |
|
Constructors |
Assignment operators |
|
Return the address of the contained object, or |
|
|
|
Assign to this object the value read from the specified |
|
Write this object to the specified output |
|
Destroy any contained value and construct a new one in place. |
|
Return allocator used for construction of |
|
Return |
|
Return |
|
|
|
Construct a |
|
|
|
Dereference operators |
|
Member access operators |
|
Return this optional if engaged; otherwise invoke |
|
Format this object to the specified output |
|
Reset this object to the default constructed state (i.e., to a disengaged state). |
|
Exchange the values of two optionals. |
|
|
|
|
|
|
|
Return an address providing non‐modifiable access to the underlying object of a (template parameter) |
|
Return the contained value, or a converted fallback if disengaged. |
|
|
|
|
|
|
|
|
|
Nested trait declaration for |
|
Nested trait declaration for |
|
|
Nested trait declaration for |
|
Nested trait declaration for |
Nested trait declaration for |
|
Nested trait declaration for |
|
Nested trait declaration for |
|
Nested trait declaration for |
|
Return |
Protected Type Aliases
Name |
Description |
This |
Protected Member Functions
Name |
Description |
Assign or emplace a value into this optional. |
|
Return a reference to the contained value without checking engagement. |
Friends
Name |
Description |
|
Value‐semantic wrapper that adds a null state to |
Non-Member Functions
Name |
Description |
Component‐private constraint helper for |
|
Return |
|
Return whether the specified |
|
Return |
|
Return whether the specified |
|
Return |
|
Return |
|
Return whether the specified |
|
Return |
|
Return |
|
Return |
|
Return whether the specified |
|
Return whether the left‐hand operand is ordered before the right. |
|
Return whether the specified |
|
Return whether the left‐hand operand is before or equal to the right. |
|
Return |
|
Return |
|
Return |
|
Return whether the specified |
|
Return a three‐way comparison of the specified |
|
Perform a three‐way comparison of the specified nullable objects. |
|
Perform a three‐way comparison of the specified |
|
Perform a three‐way comparison of the specified nullable objects. |
|
Perform a three‐way comparison of the specified nullable object and value. |
|
Return |
|
Return |
|
Return |
|
Return |
|
Return whether the specified |
|
Return whether the specified |
|
Return |
|
Return |
|
Return |
|
Return |
|
Return whether the left‐hand operand is ordered after the right. |
|
Return whether the specified |
|
Return whether the specified |
|
Return whether the left‐hand operand is after or equal to the right. |
|
Return whether the specified |
|
Return whether the specified |
|
Return |
|
Return |
|
Return |
|
Exchange the values of the specified |
|
Exchange the values of the specified |
|
Write the specified |
|
Return whether the operands do not have the same value. |
|
Return whether the operands do not have the same value. |
|
Return whether the operands do not have the same value. |
|
Return whether the left‐hand operand is ordered before the right. |
|
Return whether the left‐hand operand is ordered before the right. |
|
Return whether the left‐hand operand is ordered before the right. |
|
Return whether the left‐hand operand is before or equal to the right. |
|
Return whether the left‐hand operand is before or equal to the right. |
|
Return whether the left‐hand operand is before or equal to the right. |
|
Perform a three‐way comparison of the operands. |
|
Perform a three‐way comparison of the operands. |
|
Perform a three‐way comparison of the operands. |
|
Perform a three‐way comparison of the operands. |
|
Return whether the operands have the same value. |
|
Return whether the operands have the same value. |
|
Compare a |
|
Return whether the operands have the same value. |
|
Return whether the left‐hand operand is ordered after the right. |
|
Return whether the left‐hand operand is ordered after the right. |
|
Return whether the left‐hand operand is ordered after the right. |
|
Return whether the left‐hand operand is after or equal to the right. |
|
Return whether the left‐hand operand is after or equal to the right. |
|
Return whether the left‐hand operand is after or equal to the right. |
|
Exchange the values of two optionals. |
|
Exchange the values of two optionals. |
|
Exchange the values of two optionals. |
|
Default customization‐point implementation of |
|
Return whether the specified nullable |
|
Default customization‐point implementation of |
|
Default customization‐point implementation of |
|
|
Component‐private constraint helper for |
Created with MrDocs