|
| BSLMF_NESTED_TRAIT_DECLARATION_IF (NullableValue, bslma::UsesBslmaAllocator, bslma::UsesBslmaAllocator< TYPE >::value) |
|
| BSLMF_NESTED_TRAIT_DECLARATION_IF (NullableValue, bslmf::IsBitwiseCopyable, bslmf::IsBitwiseCopyable< TYPE >::value) |
|
| BSLMF_NESTED_TRAIT_DECLARATION_IF (NullableValue, bslmf::IsBitwiseMoveable, bslmf::IsBitwiseMoveable< TYPE >::value) |
|
| BSLMF_NESTED_TRAIT_DECLARATION (NullableValue, bdlb::HasPrintMethod) |
|
| NullableValue () BSLS_KEYWORD_NOEXCEPT |
|
| NullableValue (const allocator_type &allocator) BSLS_KEYWORD_NOEXCEPT |
|
| NullableValue (const NullableValue &original) |
|
NullableValue(bslmf::MovableRef< NullableValue > original) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(bsl | NullableValue (const NullableValue &original, const allocator_type &allocator) |
|
| NullableValue (bslmf::MovableRef< NullableValue > original, const allocator_type &allocator) |
|
template<class BDE_OTHER_TYPE > |
| NullableValue (BSLS_COMPILERFEATURES_FORWARD_REF(BDE_OTHER_TYPE) value, typename bsl::enable_if< bsl::is_convertible< BDE_OTHER_TYPE, TYPE >::value &&!bsl::is_convertible< BDE_OTHER_TYPE, allocator_type >::value, EnableType >::type=EnableType()) |
|
template<class BDE_OTHER_TYPE > |
| NullableValue (BSLS_COMPILERFEATURES_FORWARD_REF(BDE_OTHER_TYPE) value, const allocator_type &allocator, typename bsl::enable_if< bsl::is_convertible< BDE_OTHER_TYPE, TYPE >::value, EnableType >::type=EnableType()) |
|
template<class BDE_OTHER_TYPE > |
| NullableValue (const bsl::optional< BDE_OTHER_TYPE > &value, typename bsl::enable_if< bsl::is_convertible< BDE_OTHER_TYPE, TYPE >::value &&!bsl::is_same< bsl::optional< BDE_OTHER_TYPE >, TYPE >::value, EnableType >::type=EnableType()) |
|
template<class BDE_OTHER_TYPE > |
| NullableValue (const bsl::optional< BDE_OTHER_TYPE > &value, const allocator_type &allocator, typename bsl::enable_if< bsl::is_convertible< BDE_OTHER_TYPE, TYPE >::value &&!bsl::is_same< bsl::optional< BDE_OTHER_TYPE >, TYPE >::value, EnableType >::type=EnableType()) |
|
template<class BDE_OTHER_TYPE > |
| NullableValue (BSLMF_MOVABLEREF_DEDUCE(NullableValue< BDE_OTHER_TYPE >) value, typename bsl::enable_if< bsl::is_convertible< BDE_OTHER_TYPE, TYPE >::value &&!bsl::is_same< bsl::optional< BDE_OTHER_TYPE >, TYPE >::value, EnableType >::type=EnableType()) |
|
template<class BDE_OTHER_TYPE > |
| NullableValue (BSLMF_MOVABLEREF_DEDUCE(NullableValue< BDE_OTHER_TYPE >) value, const allocator_type &allocator, typename bsl::enable_if< bsl::is_convertible< BDE_OTHER_TYPE, TYPE >::value &&!bsl::is_same< bsl::optional< BDE_OTHER_TYPE >, TYPE >::value, EnableType >::type=EnableType()) |
|
template<class BDE_OTHER_TYPE > |
| NullableValue (BSLMF_MOVABLEREF_DEDUCE(bsl::optional< BDE_OTHER_TYPE >) value, typename bsl::enable_if< bsl::is_convertible< BDE_OTHER_TYPE, TYPE >::value &&!bsl::is_same< bsl::optional< BDE_OTHER_TYPE >, TYPE >::value, EnableType >::type=EnableType()) |
|
template<class BDE_OTHER_TYPE > |
| NullableValue (BSLMF_MOVABLEREF_DEDUCE(bsl::optional< BDE_OTHER_TYPE >) value, const allocator_type &allocator, typename bsl::enable_if< bsl::is_convertible< BDE_OTHER_TYPE, TYPE >::value &&!bsl::is_same< bsl::optional< BDE_OTHER_TYPE >, TYPE >::value, EnableType >::type=EnableType()) |
|
template<class BDE_OTHER_TYPE > |
| NullableValue (const NullableValue< BDE_OTHER_TYPE > &original) |
|
template<class BDE_OTHER_TYPE > |
| NullableValue (const NullableValue< BDE_OTHER_TYPE > &original, const allocator_type &allocator) |
|
| NullableValue (const bsl::nullopt_t &) BSLS_KEYWORD_NOEXCEPT |
|
| NullableValue (const bsl::nullopt_t &, const allocator_type &allocator) BSLS_KEYWORD_NOEXCEPT |
|
| ~NullableValue () |
|
NullableValue< TYPE > & | operator= (const NullableValue &rhs) |
|
NullableValue< TYPE > & | operator= (bslmf::MovableRef< NullableValue > rhs) |
|
template<class BDE_OTHER_TYPE > |
NullableValue< TYPE > & | operator= (const NullableValue< BDE_OTHER_TYPE > &rhs) |
|
template<class BDE_OTHER_TYPE > |
NullableValue< TYPE > & | operator= (BSLMF_MOVABLEREF_DEDUCE(NullableValue< BDE_OTHER_TYPE >) rhs) |
|
template<class BDE_OTHER_TYPE > |
bsl::enable_if< bsl::is_convertible< BDE_OTHER_TYPE, TYPE >::value, NullableValue< TYPE > & >::type | operator= (const bsl::optional< BDE_OTHER_TYPE > &rhs) |
|
template<class BDE_OTHER_TYPE > |
bsl::enable_if< bsl::is_convertible< BDE_OTHER_TYPE, TYPE >::value, NullableValue< TYPE > & >::type | operator= (BSLMF_MOVABLEREF_DEDUCE(bsl::optional< BDE_OTHER_TYPE >) rhs) |
|
NullableValue< TYPE > & | operator= (const TYPE &rhs) |
|
NullableValue< TYPE > & | operator= (bslmf::MovableRef< TYPE > rhs) |
|
template<class BDE_OTHER_TYPE > |
NullableValue< TYPE > & | operator= (const BDE_OTHER_TYPE &rhs) |
|
NullableValue< TYPE > & | operator= (const bsl::nullopt_t &) BSLS_KEYWORD_NOEXCEPT |
|
template<class STREAM > |
STREAM & | bdexStreamIn (STREAM &stream, int version) |
|
template<class BDE_OTHER_TYPE > |
TYPE & | makeValue (BSLS_COMPILERFEATURES_FORWARD_REF(BDE_OTHER_TYPE) value) |
|
TYPE & | makeValue () |
|
template<class... ARGS> |
TYPE & | makeValueInplace (ARGS &&... args) |
|
TYPE & | value () |
|
const TYPE * | addressOr (const TYPE *address) const |
|
template<class STREAM > |
STREAM & | bdexStreamOut (STREAM &stream, int version) const |
|
bool | isNull () const BSLS_KEYWORD_NOEXCEPT |
| Return true if this object is null, and false otherwise.
|
|
int | maxSupportedBdexVersion (int versionSelector) const |
|
int | maxSupportedBdexVersion () const |
|
bsl::ostream & | print (bsl::ostream &stream, int level=0, int spacesPerLevel=4) const |
|
const TYPE & | value () const |
|
TYPE | valueOr (const TYPE &value) const |
|
const TYPE * | valueOr (const TYPE *value) const |
|
const TYPE * | valueOrNull () const |
|
template<class TYPE > |
| NullableValue (bslmf::MovableRef< NullableValue > original) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(bsl |
|
| BSLMF_NESTED_TRAIT_DECLARATION_IF (optional, BloombergLP::bslma::UsesBslmaAllocator, BloombergLP::bslma::UsesBslmaAllocator< TYPE >::value) |
|
| BSLMF_NESTED_TRAIT_DECLARATION_IF (optional, BloombergLP::bslmf::UsesAllocatorArgT, BloombergLP::bslma::UsesBslmaAllocator< TYPE >::value) |
|
| BSLMF_NESTED_TRAIT_DECLARATION_IF (optional, BloombergLP::bslmf::IsBitwiseMoveable, BloombergLP::bslmf::IsBitwiseMoveable< TYPE >::value) |
|
| BSLMF_NESTED_TRAIT_DECLARATION_IF (optional, BloombergLP::bslmf::IsBitwiseCopyable, BloombergLP::bslmf::IsBitwiseCopyable< TYPE >::value) |
|
| optional () BSLS_KEYWORD_NOEXCEPT |
|
| optional (bsl::nullopt_t) BSLS_KEYWORD_NOEXCEPT |
|
optional(BloombergLP::bslmf::MovableRef< t_DERIVED > original, BSLSTL_OPTIONAL_DECLARE_IF_DERIVED_FROM_OPTIONAL(t_DERIVED)) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(bsl | optional (BSLS_COMPILERFEATURES_FORWARD_REF(t_ANY_TYPE) value, BSLSTL_OPTIONAL_DECLARE_IF_CONSTRUCTS_FROM(TYPE, t_ANY_TYPE), BSLSTL_OPTIONAL_DECLARE_IF_NOT_EXPLICIT_CONSTRUCT(TYPE, t_ANY_TYPE)) |
|
| optional (BSLS_COMPILERFEATURES_FORWARD_REF(t_ANY_TYPE) value, BSLSTL_OPTIONAL_DECLARE_IF_CONSTRUCTS_FROM(TYPE, t_ANY_TYPE), BSLSTL_OPTIONAL_DECLARE_IF_EXPLICIT_CONSTRUCT(TYPE, t_ANY_TYPE)) |
|
| optional (const optional< t_ANY_TYPE > &original, BSLSTL_OPTIONAL_DECLARE_IF_CONSTRUCTS_FROM_BSL_OPTIONAL(TYPE, const t_ANY_TYPE &), BSLSTL_OPTIONAL_DECLARE_IF_NOT_EXPLICIT_CONSTRUCT(TYPE, const t_ANY_TYPE &)) |
|
| optional (const optional< t_ANY_TYPE > &original, BSLSTL_OPTIONAL_DECLARE_IF_CONSTRUCTS_FROM_BSL_OPTIONAL(TYPE, const t_ANY_TYPE &), BSLSTL_OPTIONAL_DECLARE_IF_EXPLICIT_CONSTRUCT(TYPE, const t_ANY_TYPE &)) |
|
| optional (BSLMF_MOVABLEREF_DEDUCE(optional< t_ANY_TYPE >) original, BSLSTL_OPTIONAL_DECLARE_IF_CONSTRUCTS_FROM_BSL_OPTIONAL(TYPE, t_ANY_TYPE), BSLSTL_OPTIONAL_DECLARE_IF_NOT_EXPLICIT_CONSTRUCT(TYPE, t_ANY_TYPE)) |
|
| optional (BSLMF_MOVABLEREF_DEDUCE(optional< t_ANY_TYPE >) original, BSLSTL_OPTIONAL_DECLARE_IF_CONSTRUCTS_FROM_BSL_OPTIONAL(TYPE, t_ANY_TYPE), BSLSTL_OPTIONAL_DECLARE_IF_EXPLICIT_CONSTRUCT(TYPE, t_ANY_TYPE)) |
|
| optional (bsl::in_place_t, BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS)... args) |
|
| optional (bsl::allocator_arg_t, AllocType allocator) |
|
| optional (bsl::allocator_arg_t, AllocType allocator, bsl::nullopt_t) |
|
| optional (bsl::allocator_arg_t, AllocType allocator, const optional &original) |
|
| optional (bsl::allocator_arg_t, AllocType allocator, BSLMF_MOVABLEREF_DEDUCE(t_DERIVED) original, BSLSTL_OPTIONAL_DECLARE_IF_DERIVED_FROM_OPTIONAL(typename bsl::remove_reference< t_DERIVED >::type)) |
|
| optional (bsl::allocator_arg_t, AllocType allocator, BSLS_COMPILERFEATURES_FORWARD_REF(t_ANY_TYPE) value, BSLSTL_OPTIONAL_DECLARE_IF_CONSTRUCTS_FROM(TYPE, t_ANY_TYPE), BSLSTL_OPTIONAL_DECLARE_IF_NOT_EXPLICIT_CONSTRUCT(TYPE, t_ANY_TYPE)) |
|
| optional (bsl::allocator_arg_t, AllocType allocator, BSLS_COMPILERFEATURES_FORWARD_REF(t_ANY_TYPE) value, BSLSTL_OPTIONAL_DECLARE_IF_CONSTRUCTS_FROM(TYPE, t_ANY_TYPE), BSLSTL_OPTIONAL_DECLARE_IF_EXPLICIT_CONSTRUCT(TYPE, t_ANY_TYPE)) |
|
| optional (bsl::allocator_arg_t, AllocType allocator, const optional< t_ANY_TYPE > &original, BSLSTL_OPTIONAL_DECLARE_IF_CONSTRUCTS_FROM_BSL_OPTIONAL(TYPE, const t_ANY_TYPE &), BSLSTL_OPTIONAL_DECLARE_IF_NOT_EXPLICIT_CONSTRUCT(TYPE, const t_ANY_TYPE &)) |
|
| optional (bsl::allocator_arg_t, AllocType allocator, const optional< t_ANY_TYPE > &original, BSLSTL_OPTIONAL_DECLARE_IF_CONSTRUCTS_FROM_BSL_OPTIONAL(TYPE, const t_ANY_TYPE &), BSLSTL_OPTIONAL_DECLARE_IF_EXPLICIT_CONSTRUCT(TYPE, const t_ANY_TYPE &)) |
|
| optional (bsl::allocator_arg_t, AllocType allocator, BSLMF_MOVABLEREF_DEDUCE(optional< t_ANY_TYPE >) original, BSLSTL_OPTIONAL_DECLARE_IF_CONSTRUCTS_FROM_BSL_OPTIONAL(TYPE, t_ANY_TYPE), BSLSTL_OPTIONAL_DECLARE_IF_NOT_EXPLICIT_CONSTRUCT(TYPE, t_ANY_TYPE)) |
|
| optional (bsl::allocator_arg_t, AllocType allocator, BSLMF_MOVABLEREF_DEDUCE(optional< t_ANY_TYPE >) original, BSLSTL_OPTIONAL_DECLARE_IF_CONSTRUCTS_FROM_BSL_OPTIONAL(TYPE, t_ANY_TYPE), BSLSTL_OPTIONAL_DECLARE_IF_EXPLICIT_CONSTRUCT(TYPE, t_ANY_TYPE)) |
|
| optional (bsl::allocator_arg_t, AllocType allocator, bsl::in_place_t, BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS)... args) |
|
| optional (BloombergLP::bslmf::MovableRef< t_DERIVED > original, BSLSTL_OPTIONAL_DEFINE_IF_DERIVED_FROM_OPTIONAL(t_DERIVED)) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(bsl |
|
| optional (BSLS_COMPILERFEATURES_FORWARD_REF(t_ANY_TYPE) value, BSLSTL_OPTIONAL_DEFINE_IF_CONSTRUCTS_FROM(TYPE, t_ANY_TYPE), BSLSTL_OPTIONAL_DEFINE_IF_NOT_EXPLICIT_CONSTRUCT(TYPE, t_ANY_TYPE)) |
|
| optional (BSLS_COMPILERFEATURES_FORWARD_REF(t_ANY_TYPE) value, BSLSTL_OPTIONAL_DEFINE_IF_CONSTRUCTS_FROM(TYPE, t_ANY_TYPE), BSLSTL_OPTIONAL_DEFINE_IF_EXPLICIT_CONSTRUCT(TYPE, t_ANY_TYPE)) |
|
| optional (const optional< t_ANY_TYPE > &original, BSLSTL_OPTIONAL_DEFINE_IF_CONSTRUCTS_FROM_BSL_OPTIONAL(TYPE, const t_ANY_TYPE &), BSLSTL_OPTIONAL_DEFINE_IF_NOT_EXPLICIT_CONSTRUCT(TYPE, const t_ANY_TYPE &)) |
|
| optional (const optional< t_ANY_TYPE > &original, BSLSTL_OPTIONAL_DEFINE_IF_CONSTRUCTS_FROM_BSL_OPTIONAL(TYPE, const t_ANY_TYPE &), BSLSTL_OPTIONAL_DEFINE_IF_EXPLICIT_CONSTRUCT(TYPE, const t_ANY_TYPE &)) |
|
| optional (BSLMF_MOVABLEREF_DEDUCE(optional< t_ANY_TYPE >) original, BSLSTL_OPTIONAL_DEFINE_IF_CONSTRUCTS_FROM_BSL_OPTIONAL(TYPE, t_ANY_TYPE), BSLSTL_OPTIONAL_DEFINE_IF_NOT_EXPLICIT_CONSTRUCT(TYPE, t_ANY_TYPE)) |
|
| optional (BSLMF_MOVABLEREF_DEDUCE(optional< t_ANY_TYPE >) original, BSLSTL_OPTIONAL_DEFINE_IF_CONSTRUCTS_FROM_BSL_OPTIONAL(TYPE, t_ANY_TYPE), BSLSTL_OPTIONAL_DEFINE_IF_EXPLICIT_CONSTRUCT(TYPE, t_ANY_TYPE)) |
|
| optional (bsl::allocator_arg_t, AllocType allocator, BSLMF_MOVABLEREF_DEDUCE(t_DERIVED) original, BSLSTL_OPTIONAL_DEFINE_IF_DERIVED_FROM_OPTIONAL(typename bsl::remove_reference< t_DERIVED >::type)) |
|
| optional (bsl::allocator_arg_t, AllocType allocator, BSLS_COMPILERFEATURES_FORWARD_REF(t_ANY_TYPE) value, BSLSTL_OPTIONAL_DEFINE_IF_CONSTRUCTS_FROM(TYPE, t_ANY_TYPE), BSLSTL_OPTIONAL_DEFINE_IF_NOT_EXPLICIT_CONSTRUCT(TYPE, t_ANY_TYPE)) |
|
| optional (bsl::allocator_arg_t, AllocType allocator, BSLS_COMPILERFEATURES_FORWARD_REF(t_ANY_TYPE) value, BSLSTL_OPTIONAL_DEFINE_IF_CONSTRUCTS_FROM(TYPE, t_ANY_TYPE), BSLSTL_OPTIONAL_DEFINE_IF_EXPLICIT_CONSTRUCT(TYPE, t_ANY_TYPE)) |
|
| optional (bsl::allocator_arg_t, AllocType allocator, const optional< t_ANY_TYPE > &original, BSLSTL_OPTIONAL_DEFINE_IF_CONSTRUCTS_FROM_BSL_OPTIONAL(TYPE, const t_ANY_TYPE &), BSLSTL_OPTIONAL_DEFINE_IF_NOT_EXPLICIT_CONSTRUCT(TYPE, const t_ANY_TYPE &)) |
|
| optional (bsl::allocator_arg_t, AllocType allocator, const optional< t_ANY_TYPE > &original, BSLSTL_OPTIONAL_DEFINE_IF_CONSTRUCTS_FROM_BSL_OPTIONAL(TYPE, const t_ANY_TYPE &), BSLSTL_OPTIONAL_DEFINE_IF_EXPLICIT_CONSTRUCT(TYPE, const t_ANY_TYPE &)) |
|
| optional (bsl::allocator_arg_t, AllocType allocator, BSLMF_MOVABLEREF_DEDUCE(optional< t_ANY_TYPE >) original, BSLSTL_OPTIONAL_DEFINE_IF_CONSTRUCTS_FROM_BSL_OPTIONAL(TYPE, t_ANY_TYPE), BSLSTL_OPTIONAL_DEFINE_IF_NOT_EXPLICIT_CONSTRUCT(TYPE, t_ANY_TYPE)) |
|
| optional (bsl::allocator_arg_t, AllocType allocator, BSLMF_MOVABLEREF_DEDUCE(optional< t_ANY_TYPE >) original, BSLSTL_OPTIONAL_DEFINE_IF_CONSTRUCTS_FROM_BSL_OPTIONAL(TYPE, t_ANY_TYPE), BSLSTL_OPTIONAL_DEFINE_IF_EXPLICIT_CONSTRUCT(TYPE, t_ANY_TYPE)) |
|
optional & | operator= (bsl::nullopt_t) BSLS_KEYWORD_NOEXCEPT |
|
optional & | operator= (const TYPE &rhs) |
|
optional & | operator= (BloombergLP::bslmf::MovableRef< TYPE > rhs) |
|
| BSLSTL_OPTIONAL_ENABLE_ASSIGN_FROM_DERIVED (TYPE, t_DERIVED) &operator |
|
| BSLSTL_OPTIONAL_ENABLE_ASSIGN_FROM_BSL_OPTIONAL (TYPE, const t_ANY_TYPE &) &operator |
|
| BSLSTL_OPTIONAL_ENABLE_ASSIGN_FROM_BSL_OPTIONAL (TYPE, t_ANY_TYPE) &operator |
|
| BSLSTL_OPTIONAL_ENABLE_ASSIGN_FROM_ANY_TYPE (TYPE, t_ANY_TYPE) &operator |
|
| BSLSTL_OPTIONAL_ENABLE_ASSIGN_FROM_ANY_TYPE (TYPE, t_ANY_TYPE) &operator |
|
template<class TYPE>
class bdlb::NullableValue< TYPE >
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
.
See bdlb_nullablevalue