This metafunction is derived from bsl::true_type if t_ANY_TYPE is not derived from bsl::optional<t_TYPE>, t_ANY_TYPE is not a tag type, and t_TYPE is constructible from t_ANY_TYPE.
Declared in <bslstl_optional.h>
template<
class t_TYPE,
class t_ANY_TYPE>
struct Optional_ConstructsFromType
: bsl::integral_constant<bool, !bslmf::IsAccessibleBaseOf<bsl::optional<t_TYPE>, typename bsl::remove_cvref<t_ANY_TYPE>::type>::value && !bsl::is_same<typename bsl::remove_cvref<t_ANY_TYPE>::type, bsl::nullopt_t>::value && !bsl::is_same<typename bsl::remove_cvref<t_ANY_TYPE>::type, bsl::in_place_t>::value && !bsl::is_same<typename bsl::remove_cvref<t_ANY_TYPE>::type, bsl::allocator_arg_t>::value && std::is_constructible<t_TYPE, t_ANY_TYPE>::value>
| Name | Description |
|---|---|
bsl::integral_constant<bool, !bslmf::IsAccessibleBaseOf<bsl::optional<t_TYPE>, typename bsl::remove_cvref<t_ANY_TYPE>::type>::value && !bsl::is_same<typename bsl::remove_cvref<t_ANY_TYPE>::type, bsl::nullopt_t>::value && !bsl::is_same<typename bsl::remove_cvref<t_ANY_TYPE>::type, bsl::in_place_t>::value && !bsl::is_same<typename bsl::remove_cvref<t_ANY_TYPE>::type, bsl::allocator_arg_t>::value && std::is_constructible<t_TYPE, t_ANY_TYPE>::value> | Metafunction representing a compile-time constant of the specified (template parameter) t_TYPE with the specified (template parameter) t_VALUE. |
| Name | Description |
|---|---|
type | Alias for this integral_constant specialization. |
value_type |
| Name | Description |
|---|---|
operator() | Return a copy of the template argument t_VALUE. |
operator value_type |
| Name |
|---|
value |