tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
Public Types
|
Public Member Functions
|
List of all members
optional< T & > Struct Template Reference
#include <
optional.hpp
>
Public Types
using
value_type
=
T
&
Public Member Functions
constexpr
optional
() noexcept=
default
constexpr
optional
(
nullopt_t
) noexcept
constexpr
optional
(
optional
&&other) noexcept=
default
constexpr
optional
(
optional
const
&other)=
default
constexpr
~optional
()=
default
template<
typename
U = T>
requires (
not
is_same_v
<
remove_cvref_t
<U>,
optional
>)
constexpr
auto
emplace
(U &&
u
) noexcept ->
optional
&
template<
typename
U >
requires (
not
is_same_v
<
remove_cvref_t
<U>,
optional
>)
constexpr
explicit
(
not
is_convertible_v
< U,
T
>)
optional
(
optional
< U >
const
&
rhs
)
template<
typename
U = T>
requires (
not
is_same_v
<
remove_cvref_t
<U>,
optional
>)
constexpr
explicit
(
not
is_convertible_v
< U,
T
>)
optional
(U &&
v
)
constexpr
auto
has_value
()
const
noexcept ->
bool
constexpr
operator bool
()
const
noexcept
constexpr
auto
operator*
()
const
noexcept ->
T
&
constexpr
auto
operator->
()
const
noexcept ->
T
*
constexpr
auto
operator=
(
nullopt_t
) noexcept ->
optional
&
constexpr
auto
operator=
(
optional
&&) noexcept ->
optional
&=
default
constexpr
auto
operator=
(
optional
const
&) noexcept ->
optional
&=
default
template<
typename
U >
constexpr
auto
operator=
(
optional
< U >
const
&
rhs
) ->
optional
&
template<
typename
U = T>
requires (
not
is_same_v
<
remove_cvref_t
<U>,
optional
>
and
not
conjunction_v<
is_scalar
<
T
>,
is_same
<
T
,
decay_t
<U>>>)
constexpr
auto
operator=
(U &&
v
) ->
optional
&
constexpr
void
reset
() noexcept
constexpr
void
swap
(
optional
&
rhs
) noexcept
Member Typedef Documentation
◆
value_type
template<
typename
T
>
using
value_type
=
T
&
Constructor & Destructor Documentation
◆
optional()
[1/4]
template<
typename
T
>
constexpr
optional
(
)
constexpr
default
noexcept
◆
optional()
[2/4]
template<
typename
T
>
constexpr
optional
(
nullopt_t
)
inline
constexpr
noexcept
◆
optional()
[3/4]
template<
typename
T
>
constexpr
optional
(
optional
<
T
& >
const
&
other
)
constexpr
default
◆
optional()
[4/4]
template<
typename
T
>
constexpr
optional
(
optional
<
T
& > &&
other
)
constexpr
default
noexcept
◆
~optional()
template<
typename
T
>
constexpr
~
optional
(
)
constexpr
default
Member Function Documentation
◆
emplace()
template<
typename
T
>
template<
typename
U = T>
requires (
not
is_same_v
<
remove_cvref_t
<U>,
optional
>)
constexpr
auto
emplace
(
U &&
u
)
->
optional
&
inline
constexpr
noexcept
◆
explicit()
[1/2]
template<
typename
T
>
template<
typename
U >
requires (
not
is_same_v
<
remove_cvref_t
<U>,
optional
>)
constexpr
explicit
(
not
is_convertible_v
< U,
T
>
)
const &
inline
constexpr
◆
explicit()
[2/2]
template<
typename
T
>
template<
typename
U = T>
requires (
not
is_same_v
<
remove_cvref_t
<U>,
optional
>)
constexpr
explicit
(
not
is_convertible_v
< U,
T
>
)
&&
inline
constexpr
◆
has_value()
template<
typename
T
>
constexpr
auto
has_value
(
)
const ->
bool
inline
constexpr
noexcept
◆
operator bool()
template<
typename
T
>
constexpr
operator
bool
(
)
const
inline
explicit
constexpr
noexcept
◆
operator*()
template<
typename
T
>
constexpr
auto
operator
*
(
)
const ->
T
&
inline
constexpr
noexcept
◆
operator->()
template<
typename
T
>
constexpr
auto
operator
->
(
)
const ->
T
*
inline
constexpr
noexcept
◆
operator=()
[1/5]
template<
typename
T
>
constexpr
auto
operator
=
(
nullopt_t
)
->
optional
&
inline
constexpr
noexcept
◆
operator=()
[2/5]
template<
typename
T
>
constexpr
auto
operator
=
(
optional
<
T
& > &&
)
->
optional
&=
default
constexpr
default
noexcept
◆
operator=()
[3/5]
template<
typename
T
>
constexpr
auto
operator
=
(
optional
<
T
& >
const
&
)
->
optional
&=
default
constexpr
default
noexcept
◆
operator=()
[4/5]
template<
typename
T
>
template<
typename
U >
constexpr
auto
operator
=
(
optional
< U >
const
&
rhs
)
->
optional
&
inline
constexpr
◆
operator=()
[5/5]
template<
typename
T
>
template<
typename
U = T>
requires (
not
is_same_v
<
remove_cvref_t
<U>,
optional
>
and
not
conjunction_v<
is_scalar
<
T
>,
is_same
<
T
,
decay_t
<U>>>)
constexpr
auto
operator
=
(
U &&
v
)
->
optional
&
inline
constexpr
◆
reset()
template<
typename
T
>
constexpr
void
reset
(
)
inline
constexpr
noexcept
◆
swap()
template<
typename
T
>
constexpr
void
swap
(
optional
<
T
& > &
rhs
)
inline
constexpr
noexcept
The documentation for this struct was generated from the following file:
include/etl/_optional/
optional.hpp
etl
optional< T & >
Generated on Sat Sep 20 2025 23:51:11 for tetl by
1.9.8