Constructors
Synopses
Declared in <bdlb_nullablevalue.h>
Create a nullable object having the null value.
NullableValue() noexcept;
Create a nullable object having the value of the specified original.
NullableValue(NullableValue const& original);
Create a nullable object converted from the specified original.
template<class BDE_OTHER_TYPE>
explicit
NullableValue(NullableValue<BDE_OTHER_TYPE> const& original);
Create a nullable object by moving from the specified original.
NullableValue(bslmf::MovableRef<NullableValue> original) noexcept(/* see-below */);
Create a null nullable object that uses the specified allocator.
explicit
NullableValue(allocator_type const& allocator) noexcept;
Create a nullable object having the null value.
NullableValue(bsl::nullopt_t const& nullopt) noexcept;
Create a nullable object having the same value as the specified value (of NullableValue<BDE_OTHER_TYPE>) converted to TYPE.
template<class BDE_OTHER_TYPE>
NullableValue(BloombergLP::bslmf::MovableRef_Deduced<NullableValue<BDE_OTHER_TYPE>> value)
requires bsl::is_convertible<BDE_OTHER_TYPE, TYPE>::value &&
!bsl::is_same<bsl::optional<BDE_OTHER_TYPE>, TYPE>::value;
Create a nullable object from the specified optional value.
template<class BDE_OTHER_TYPE>
NullableValue(BloombergLP::bslmf::MovableRef_Deduced<bsl::optional<BDE_OTHER_TYPE>> value)
requires bsl::is_convertible<BDE_OTHER_TYPE, TYPE>::value &&
!bsl::is_same<bsl::optional<BDE_OTHER_TYPE>, TYPE>::value;
Create a nullable object from the specified optional value.
template<class BDE_OTHER_TYPE>
NullableValue(bsl::optional<BDE_OTHER_TYPE> const& value)
requires bsl::is_convertible<BDE_OTHER_TYPE, TYPE>::value &&
!bsl::is_same<bsl::optional<BDE_OTHER_TYPE>, TYPE>::value;
Create a nullable object from the specified value converted to TYPE.
template<class BDE_OTHER_TYPE>
NullableValue(BDE_OTHER_TYPE&& value)
requires bsl::is_convertible<BDE_OTHER_TYPE, TYPE>::value &&
!bsl::is_convertible<BDE_OTHER_TYPE,
allocator_type>::value;
Create a nullable object by moving original using allocator.
NullableValue(
bslmf::MovableRef<NullableValue> original,
allocator_type const& allocator);
Create a copy of original that uses the specified allocator.
NullableValue(
NullableValue const& original,
allocator_type const& allocator);
Create a null nullable object that uses the specified allocator.
NullableValue(
bsl::nullopt_t const& nullopt,
allocator_type const& allocator) noexcept;
Create a nullable object by converting the specified value.
template<class BDE_OTHER_TYPE>
NullableValue(
BloombergLP::bslmf::MovableRef_Deduced<NullableValue<BDE_OTHER_TYPE>> value,
allocator_type const& allocator)
requires bsl::is_convertible<BDE_OTHER_TYPE, TYPE>::value &&
!bsl::is_same<bsl::optional<BDE_OTHER_TYPE>, TYPE>::value;
Create a nullable object from the specified value using the specified allocator.
template<class BDE_OTHER_TYPE>
NullableValue(
BloombergLP::bslmf::MovableRef_Deduced<bsl::optional<BDE_OTHER_TYPE>> value,
allocator_type const& allocator)
requires bsl::is_convertible<BDE_OTHER_TYPE, TYPE>::value &&
!bsl::is_same<bsl::optional<BDE_OTHER_TYPE>, TYPE>::value;
Create a nullable object from original using allocator.
template<class BDE_OTHER_TYPE>
NullableValue(
NullableValue<BDE_OTHER_TYPE> const& original,
allocator_type const& allocator);
Create a nullable object having the value of the specified value (of BDE_OTHER_TYPE) converted to TYPE and that uses the specified allocator to supply memory.
template<class BDE_OTHER_TYPE>
NullableValue(
bsl::optional<BDE_OTHER_TYPE> const& value,
allocator_type const& allocator)
requires bsl::is_convertible<BDE_OTHER_TYPE, TYPE>::value &&
!bsl::is_same<bsl::optional<BDE_OTHER_TYPE>, TYPE>::value;
Create a nullable object from value using the specified allocator.
template<class BDE_OTHER_TYPE>
NullableValue(
BDE_OTHER_TYPE&& value,
allocator_type const& allocator)
requires bsl::is_convertible<BDE_OTHER_TYPE, TYPE>::value;
Parameters
Name |
Description |
original |
object providing the initial value |
allocator |
allocator used to supply memory |
nullopt |
disengaged‐optional tag |
value |
nullable object from which to move |
Created with MrDocs