AWS IoT Device SDK C++ v2
1.34.0
AWS IoT Device SDK C++ v2
|
Go to the documentation of this file.
23 new (m_storage) T(val);
24 m_value =
reinterpret_cast<T *
>(m_storage);
29 new (m_storage) T(std::forward<T>(val));
30 m_value =
reinterpret_cast<T *
>(m_storage);
45 *m_value = std::forward<U>(u);
49 new (m_storage) T(std::forward<U>(u));
50 m_value =
reinterpret_cast<T *
>(m_storage);
59 new (m_storage) T(*other.m_value);
60 m_value =
reinterpret_cast<T *
>(m_storage);
72 new (m_storage) T(std::forward<T>(*other.m_value));
73 m_value =
reinterpret_cast<T *
>(m_storage);
83 new (m_storage) T(std::forward<Args>(args)...);
84 m_value =
reinterpret_cast<T *
>(m_storage);
98 *m_value = *other.m_value;
111 new (m_storage) T(*other.m_value);
112 m_value =
reinterpret_cast<T *
>(m_storage);
129 *m_value = *other.m_value;
142 new (m_storage) T(*other.m_value);
143 m_value =
reinterpret_cast<T *
>(m_storage);
160 *m_value = std::forward<U>(*other.m_value);
173 new (m_storage) T(std::forward<U>(*other.m_value));
174 m_value =
reinterpret_cast<T *
>(m_storage);
180 template <
typename... Args> T &
emplace(Args &&...args)
184 new (m_storage) T(std::forward<Args>(args)...);
185 m_value =
reinterpret_cast<T *
>(m_storage);
194 const T &&
operator*() const && {
return std::move(*m_value); }
197 explicit operator bool() const noexcept {
return m_value !=
nullptr; }
198 bool has_value() const noexcept {
return m_value !=
nullptr; }
201 const T &
value() const & {
return *m_value; }
203 T &&
value() && {
return std::move(*m_value); }
204 const T &&
value() const && {
return std::move(*m_value); }
216 alignas(T)
char m_storage[
sizeof(T)];
const T && operator*() const &&
Definition: Optional.h:194
Optional(const T &val)
Definition: Optional.h:21
T & emplace(Args &&...args)
Definition: Optional.h:180
const T & operator*() const &
Definition: Optional.h:192
Optional(T &&val)
Definition: Optional.h:27
Optional & operator=(U &&u)
Definition: Optional.h:41
Optional< T > & operator=(Optional< U > &&other)
Definition: Optional.h:149
bool has_value() const noexcept
Definition: Optional.h:198
Definition: Optional.h:18
T & value() &
Definition: Optional.h:200
~Optional()
Definition: Optional.h:33
Definition: Allocator.h:11
T & operator*() &
Definition: Optional.h:193
const T & value() const &
Definition: Optional.h:201
Optional< T > & operator=(const Optional< U > &other)
Definition: Optional.h:118
const T && value() const &&
Definition: Optional.h:204
T && operator*() &&
Definition: Optional.h:195
T && value() &&
Definition: Optional.h:203
Optional(Optional< T > &&other)
Definition: Optional.h:68
Optional()
Definition: Optional.h:20
Optional(const Optional< T > &other)
Definition: Optional.h:55
Optional & operator=(const Optional &other)
Definition: Optional.h:87
T * operator->()
Definition: Optional.h:191
const T * operator->() const
Definition: Optional.h:190
void reset()
Definition: Optional.h:206
Optional(Aws::Crt::InPlaceT, Args &&...args)
Definition: Optional.h:81