|
halcheck 1.0
|
An implementation of std::optional. More...
#include <optional.hpp>
Public Member Functions | |
| constexpr | optional (lib::nullopt_t) noexcept |
| template<typename U = T> | |
| optional (const optional< U > &other) | |
| template<typename U = T> | |
| optional (const optional< U > &other) | |
| template<typename U = T> | |
| optional (optional< U > &&other) | |
| template<typename U = T> | |
| optional (optional< U > &&other) | |
| template<typename U = T, typename... Args> | |
| constexpr | optional (lib::in_place_t, Args &&...args) |
| template<typename U = T, typename... Args> | |
| constexpr | optional (lib::in_place_t, std::initializer_list< U > ilist, Args &&...args) |
| template<typename U = lib::remove_cvref_t<T>> | |
| constexpr | optional (U &&value) |
| template<typename U = lib::remove_cvref_t<T>> | |
| constexpr | optional (U &&value) |
| optional & | operator= (lib::nullopt_t) |
| template<typename U = lib::remove_cv_t<T>> | |
| optional & | operator= (U &&other) |
| template<typename U > | |
| optional & | operator= (optional< U > &&other) |
| template<typename U > | |
| optional & | operator= (const optional< U > &other) |
| const value_type * | operator-> () const |
| value_type * | operator-> () |
| constexpr bool | has_value () const noexcept |
| const T & | value () const & |
| T & | value () & |
| const T && | value () const && |
| T && | value () && |
| template<typename U = lib::remove_cv_t<T>> | |
| constexpr T | value_or (U &&default_value) const & |
| template<typename U = lib::remove_cv_t<T>> | |
| T | value_or (U &&default_value) && |
| template<bool _ = std::is_move_constructible<T>() && lib::is_swappable<T>()> | |
| void | swap (optional &other) noexcept(std::is_nothrow_move_constructible< T >() &&lib::is_nothrow_swappable< T >()) |
Friends | |
| template<bool _ = true> | |
| void | swap (lib::optional< T > &lhs, lib::optional< T > &rhs) noexcept(std::is_nothrow_move_constructible< T >() &&lib::is_nothrow_swappable< T >()) |
| An implementation of std::swap for optional. | |
An implementation of std::optional.