Template for a nullable TYPE that may be allocated out‐of‐place.
Synopsis
Declared in <bdlb_nullableallocatedvalue.h>
template<class TYPE>
class NullableAllocatedValue;
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 NullableAllocatedValue<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. Attempts to copy construct, copy assign, or compare incompatible values types will fail to compile. The NullableAllocatedValue template can be instantiated on an incomplete type, but it cannot be instantiated on a type that overloads operator&.
Type Aliases
Name |
Description |
|
Member Functions
Name |
Description |
|
Constructors |
|
Destroy this object. |
Assignment operators |
|
Return the address of the contained value, or |
|
Return the allocator used by this object to supply memory. |
|
Assign to this object the value read from the specified input |
|
Write this object to the specified output |
|
Destroy any contained value and construct a new one in place. |
|
Return the allocator used by this object to supply memory. |
|
Return |
|
Return |
|
|
|
Destroy any contained value and construct a new one in place. |
|
|
|
Dereference operators |
|
Member access operators |
|
Format this object to the specified output |
|
Reset this object to the default constructed state (i.e., to have the null value). |
|
Exchange the values of this object and |
|
|
|
Return the contained value, or |
|
Return an address providing non‐modifiable access to the underlying object of a (template parameter) |
|
Return the contained value, or |
|
|
Declare that |
|
Declare |
|
Declare that |
Return |
Non-Member Functions
Name |
Description |
Return whether the operands do not have the same value. |
|
Return whether the operands do not have the same value. |
|
Return |
|
Return whether the operands do not have the same value. |
|
Return |
|
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 |
|
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. |
|
Return whether the operands have the same value. |
|
Return whether the specified nullable value is null. |
|
Return whether the operands have the same value. |
|
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 |
|
Return |
|
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 nullable objects. |
|
Invoke |
|
Default customization‐point implementation of |
|
Default customization‐point implementation of |
|
Default customization‐point implementation of |
Created with MrDocs