Create a nullable object from the specified value converted to TYPE.

Synopsis

Declared in <bdlb_nullablevalue.h>

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;

Description

Create a nullable object having the specified value (of BDE_OTHER_TYPE) converted to TYPE. If TYPE takes an optional allocator at construction, use the currently installed default allocator to supply memory. Note that this constructor will not participate in overload resolution unless BDE_OTHER_TYPE is convertible to TYPE and is not convertible to allocator_type.

Parameters

Name

Description

value

value converted to TYPE

Created with MrDocs