1#ifndef NE_STL_INCLUDENE_STL_INUSE_VALUE_H
2#define NE_STL_INCLUDENE_STL_INUSE_VALUE_H
31 template <
class TValue>
35 value_ =
static_cast<T
>(other.value());
39 template <
class TValue>
40 operator std::optional<TValue>()
const {
44 return std::optional<TValue>(
static_cast<TValue
>(
value_));
47 template <
class TValue>
55 template <
class TValue>
60 template <
class TValue>
79 template <
class TValue>
83 value_ =
static_cast<T
>(other.value());
98 template <
class TValue>
104 template <
class TValue>
138inline constexpr std::nullopt_t
nullopt = std::nullopt;
Definition: ne_stl_any.h:7
constexpr std::nullopt_t nullopt
Definition: ne_stl_optional.h:138
unsigned char bool
Definition: stdbool.h:25
Definition: ne_stl_optional.h:11
bool has_value_
Definition: ne_stl_optional.h:12
T value_
Definition: ne_stl_optional.h:13
Definition: ne_stl_optional.h:16
_optional & operator=(const TValue *value)
Definition: ne_stl_optional.h:61
const T && operator*() const &&
Definition: ne_stl_optional.h:129
const T * operator->() const
Definition: ne_stl_optional.h:125
_optional(std::nullptr_t)
Definition: ne_stl_optional.h:29
_optional(const _optional &other)
Definition: ne_stl_optional.h:19
_optional & operator=(const T &value)
Definition: ne_stl_optional.h:88
void reset()
Definition: ne_stl_optional.h:120
_optional(const T &value)
Definition: ne_stl_optional.h:25
T && operator*() &&
Definition: ne_stl_optional.h:130
bool has_value_
Definition: ne_stl_optional.h:12
T * operator->()
Definition: ne_stl_optional.h:126
T value_or(T &&default_value) const &
Definition: ne_stl_optional.h:122
bool operator!=(const _optional &other) const
Definition: ne_stl_optional.h:119
_optional & operator=(const std::optional< TValue > &other)
Definition: ne_stl_optional.h:80
T value_
Definition: ne_stl_optional.h:13
_optional(const std::optional< TValue > &other)
Definition: ne_stl_optional.h:32
_optional & operator=(const _optional< TValue > &other)
Definition: ne_stl_optional.h:105
_optional(const TValue *other)
Definition: ne_stl_optional.h:56
bool has_value() const
Definition: ne_stl_optional.h:123
const T & operator*() const &
Definition: ne_stl_optional.h:127
_optional & operator=(std::nullptr_t)
Definition: ne_stl_optional.h:71
T & operator*() &
Definition: ne_stl_optional.h:128
bool operator==(const _optional &other) const
Definition: ne_stl_optional.h:110
_optional & operator=(const char *value)
Definition: ne_stl_optional.h:66
_optional & operator=(const TValue &value)
Definition: ne_stl_optional.h:99
const T & value() const &
Definition: ne_stl_optional.h:121
_optional & operator=(const _optional &other)
Definition: ne_stl_optional.h:93
_optional(std::nullopt_t)
Definition: ne_stl_optional.h:30
_optional & operator=(std::nullopt_t)
Definition: ne_stl_optional.h:75