make_optional overloads
Declared in <bslstl_optional.h>
Return an optional object containing a value-initialized t_TYPE object. If t_TYPE uses an allocator, the default allocator will be used for the optional object. This function can be called in constant expressions only if t_TYPE is not allocator-aware.
template<class t_TYPE>
constexpr
bsl::optional<t_TYPE>
make_optional();
» more...
Return an optional object containing a t_TYPE object created by invoking a bsl::optional constructor with the specified rhs as the constructor argument. If t_TYPE uses an allocator, the default allocator will be used for the optional object. This function can be called in constant expressions only if t_TYPE is not allocator-aware.
template<class t_TYPE>
constexpr
bsl::optional<bsl::decay<t_TYPE>::type>
make_optional(t_TYPE&& rhs);
» more...
Return an optional object containing a t_TYPE object created by invoking a bsl::optional in_place_t constructor with the specified il and args as the constructor arguments. If t_TYPE uses an allocator, the default allocator will be used for the optional object. This function can be called in constant expressions only if t_TYPE is not allocator-aware.
template<
class t_TYPE,
class t_INIT_LIST_TYPE,
class... t_ARGS>
constexpr
bsl::optional<t_TYPE>
make_optional(
std::initializer_list<t_INIT_LIST_TYPE> il,
t_ARGS&&... args);
» more...
Return an optional object containing a TYPE object created by invoking a bsl::optional in_place_t constructor with the specified arg and args as the constructor arguments. If t_TYPE uses an allocator, the default allocator will be used for the optional object. This function can be called in constant expressions only if t_TYPE is not allocator-aware.
template<
class t_TYPE,
class t_ARG,
class... t_ARGS>
constexpr
optional<t_TYPE>
make_optional(
t_ARG&& arg,
t_ARGS&&... args);
» more...
Return an optional object containing a t_TYPE object created by invoking a bsl::optional allocator-extended in_place_t constructor with the specified alloc as the allocator argument, and specified rhs as the constructor argument. Note that this function will fail to compile if t_TYPE doesn't use allocators.
template<class t_TYPE>
bsl::optional<bsl::decay<t_TYPE>::type>
make_optional(
std::allocator_arg_t,
bsl::optional<bsl::decay<t_TYPE>::type>::allocator_type const& alloc,
t_TYPE&& rhs);
» more...
Return an optional object containing a t_TYPE object created by invoking a bsl::optional allocator-extended in_place_t constructor with the specified alloc as the allocator argument, and specified args as constructor arguments. Note that this function will fail to compile if t_TYPE doesn't use allocators.
template<
class t_TYPE,
class... t_ARGS>
bsl::optional<t_TYPE>
make_optional(
std::allocator_arg_t,
bsl::optional<t_TYPE>::allocator_type const& alloc,
t_ARGS&&... args);
» more...
Return an optional object containing a t_TYPE object created by invoking a bsl::optional allocator-extended in_place_t constructor with the specified alloc as the allocator argument, and specified il and args as the constructor arguments. Note that this function will fail to compile if t_TYPE doesn't use allocators.
template<
class t_TYPE,
class t_INIT_LIST_TYPE,
class... t_ARGS>
bsl::optional<t_TYPE>
make_optional(
std::allocator_arg_t,
bsl::optional<t_TYPE>::allocator_type const& alloc,
std::initializer_list<t_INIT_LIST_TYPE> il,
t_ARGS&&... args);
» more...