Manages an optional contained value, i.e. a value that may or may not be present.
More...
|
constexpr | Nullable () |
| Constructs a Nullable that represents the absence of value.
|
|
constexpr | Nullable (T initialValue) noexcept(std::is_nothrow_move_constructible< T >::value) |
| Constructs a Nullable having an initialValue .
|
|
| Nullable (const Nullable &other) noexcept(std::is_nothrow_copy_constructible< T >::value) |
| Constructs a Nullable by copying another Nullable .
|
|
| Nullable (Nullable &&other) noexcept(std::is_nothrow_move_constructible< T >::value) |
| Constructs a Nullable by moving in another Nullable .
|
|
| ~Nullable () |
| Destructs the Nullable , calling the destructor for the contained value if there is one.
|
|
void | Reset () noexcept(std::is_nothrow_destructible< T >::value) |
| Destructs the contained value, if there is one.
|
|
void | Swap (Nullable &other) noexcept(std::is_nothrow_move_constructible< T >::value) |
| Exchanges the contents.
|
|
Nullable & | operator= (const Nullable &other) |
| Assignment operator.
|
|
Nullable & | operator= (Nullable &&other) noexcept(std::is_nothrow_move_constructible< T >::value) |
| Assignment operator with move semantics.
|
|
template<class U = T, typename std::enable_if< !std::is_same< Nullable, typename std::remove_cv< typename std::remove_reference< U >::type >::type >::value &&!(std::is_scalar< U >::value &&std::is_same< T, typename std::decay< U >::type >::value) &&std::is_constructible< T, U >::value &&std::is_assignable< T &, U >::value, int >::type = 0> |
Nullable & | operator= (U &&other) noexcept(std::is_nothrow_constructible< T, U >::value &&std::is_nothrow_assignable< T &, U >::value) |
| Assignment operator from another type.
|
|
template<class... U> |
T & | Emplace (U &&... Args) noexcept(std::is_nothrow_constructible< T, U... >::value) |
| Construct the contained value in-place.
|
|
bool | HasValue () const noexcept |
| Check whether a value is contained.
|
|
const T & | Value () const &noexcept |
| Get the contained value.
|
|
T & | Value () &noexcept |
| Get the contained value reference.
|
|
T && | Value () &&noexcept |
| Get the contained value (as rvalue reference).
|
|
constexpr | operator bool () const noexcept |
| operator bool on the condition of Azure::Nullable::HasValue.
|
|
constexpr const T * | operator-> () const |
| Accesses the contained value.
|
|
constexpr T * | operator-> () |
| Accesses the contained value.
|
|
constexpr const T & | operator* () const & |
| Accesses the contained value.
|
|
constexpr T & | operator* () & |
| Accesses the contained value.
|
|
constexpr T && | operator* () && |
| Accesses the contained value.
|
|
constexpr const T && | operator* () const && |
| Accesses the contained value.
|
|
template<class U = T, typename std::enable_if< std::is_convertible< const T &, typename std::remove_cv< T >::type >::value &&std::is_convertible< U, T >::value, int >::type = 0> |
constexpr std::remove_cv< T >::type | ValueOr (U &&other) const & |
| Get the contained value, returns other if value is absent.
|
|
template<class U = T, typename std::enable_if< std::is_convertible< T, typename std::remove_cv< T >::type >::value &&std::is_convertible< U, T >::value, int >::type = 0> |
constexpr std::remove_cv< T >::type | ValueOr (U &&other) && |
| Get the contained value, returns other if value is absent.
|
|
template<class T>
class Azure::Nullable< T >
- Template Parameters
-
T | A type to represent contained values. |