iceoryx2
C++ Bindings
Loading...
Searching...
No Matches
iox2::bb::stl::detail::OptionalValueHolder< T > Class Template Reference

#include <optional.hpp>

Public Member Functions

constexpr OptionalValueHolder () noexcept
constexpr OptionalValueHolder (T const &value)
constexpr OptionalValueHolder (T &&value)
constexpr OptionalValueHolder (OptionalValueHolder const &rhs)
constexpr OptionalValueHolder (OptionalValueHolder &&rhs) noexcept(std::is_nothrow_move_constructible< T >::value)
IOX2_CONSTEXPR_DTOR ~OptionalValueHolder ()
constexpr auto operator= (OptionalValueHolder const &rhs) -> OptionalValueHolder &
constexpr auto operator= (OptionalValueHolder &&rhs) noexcept(std::is_nothrow_move_assignable< T >::value) -> OptionalValueHolder &
constexpr auto is_empty () const -> bool
constexpr auto set (T const &value) -> void
constexpr auto set (T &&value) -> void
constexpr auto unchecked_get () &-> T &
constexpr auto unchecked_get () const &-> T const &
constexpr auto unchecked_get () &&-> T &&
constexpr auto unchecked_get () const &&-> T const &&
constexpr auto reset () -> void

Detailed Description

template<typename T>
class iox2::bb::stl::detail::OptionalValueHolder< T >

Internal union implementation for Optional.

Todo
Proper handling of cond. explicit, cond. noexcept and triviality of special member functions.

Definition at line 50 of file optional.hpp.

Constructor & Destructor Documentation

◆ OptionalValueHolder() [1/5]

template<typename T>
iox2::bb::stl::detail::OptionalValueHolder< T >::OptionalValueHolder ( )
inlineconstexprnoexcept

Definition at line 59 of file optional.hpp.

References m_u_null.

Referenced by operator=(), operator=(), OptionalValueHolder(), and OptionalValueHolder().

◆ OptionalValueHolder() [2/5]

template<typename T>
iox2::bb::stl::detail::OptionalValueHolder< T >::OptionalValueHolder ( T const & value)
inlineexplicitconstexpr

Definition at line 62 of file optional.hpp.

References m_u_value.

◆ OptionalValueHolder() [3/5]

template<typename T>
iox2::bb::stl::detail::OptionalValueHolder< T >::OptionalValueHolder ( T && value)
inlineexplicitconstexpr

Definition at line 66 of file optional.hpp.

References m_u_value.

◆ OptionalValueHolder() [4/5]

template<typename T>
iox2::bb::stl::detail::OptionalValueHolder< T >::OptionalValueHolder ( OptionalValueHolder< T > const & rhs)
inlineconstexpr

Definition at line 70 of file optional.hpp.

References OptionalValueHolder().

◆ OptionalValueHolder() [5/5]

template<typename T>
iox2::bb::stl::detail::OptionalValueHolder< T >::OptionalValueHolder ( OptionalValueHolder< T > && rhs)
inlineconstexprnoexcept

Definition at line 77 of file optional.hpp.

References OptionalValueHolder().

◆ ~OptionalValueHolder()

Definition at line 85 of file optional.hpp.

References IOX2_CONSTEXPR_DTOR, and reset().

Member Function Documentation

◆ is_empty()

template<typename T>
auto iox2::bb::stl::detail::OptionalValueHolder< T >::is_empty ( ) const->bool
inlineconstexpr

Definition at line 114 of file optional.hpp.

◆ operator=() [1/2]

template<typename T>
auto iox2::bb::stl::detail::OptionalValueHolder< T >::operator= ( OptionalValueHolder< T > && rhs) ->OptionalValueHolder &
inlineconstexprnoexcept

Definition at line 101 of file optional.hpp.

References OptionalValueHolder(), reset(), and set().

◆ operator=() [2/2]

template<typename T>
auto iox2::bb::stl::detail::OptionalValueHolder< T >::operator= ( OptionalValueHolder< T > const & rhs) ->OptionalValueHolder &
inlineconstexpr

Definition at line 89 of file optional.hpp.

References OptionalValueHolder(), reset(), and set().

◆ reset()

template<typename T>
auto iox2::bb::stl::detail::OptionalValueHolder< T >::reset ( ) ->void
inlineconstexpr

Definition at line 160 of file optional.hpp.

References m_u_value.

Referenced by operator=(), operator=(), and ~OptionalValueHolder().

◆ set() [1/2]

template<typename T>
auto iox2::bb::stl::detail::OptionalValueHolder< T >::set ( T && value) ->void
inlineconstexpr

Definition at line 129 of file optional.hpp.

References m_u_value.

◆ set() [2/2]

template<typename T>
auto iox2::bb::stl::detail::OptionalValueHolder< T >::set ( T const & value) ->void
inlineconstexpr

Definition at line 118 of file optional.hpp.

References m_u_value.

Referenced by operator=(), and operator=().

◆ unchecked_get() [1/4]

template<typename T>
auto iox2::bb::stl::detail::OptionalValueHolder< T >::unchecked_get ( ) &&->T &&
inlineconstexpr

Definition at line 150 of file optional.hpp.

References m_u_value.

◆ unchecked_get() [2/4]

template<typename T>
auto iox2::bb::stl::detail::OptionalValueHolder< T >::unchecked_get ( ) &->T &
inlineconstexpr

Definition at line 140 of file optional.hpp.

References m_u_value.

◆ unchecked_get() [3/4]

template<typename T>
auto iox2::bb::stl::detail::OptionalValueHolder< T >::unchecked_get ( ) const &&->Tconst &&
inlineconstexpr

Definition at line 155 of file optional.hpp.

References m_u_value.

◆ unchecked_get() [4/4]

template<typename T>
auto iox2::bb::stl::detail::OptionalValueHolder< T >::unchecked_get ( ) const &->Tconst &
inlineconstexpr

Definition at line 145 of file optional.hpp.

References m_u_value.

Member Data Documentation

◆ m_u_null

template<typename T>
char iox2::bb::stl::detail::OptionalValueHolder< T >::m_u_null

Definition at line 53 of file optional.hpp.

Referenced by OptionalValueHolder().

◆ m_u_value

template<typename T>
std::remove_cv_t<T> iox2::bb::stl::detail::OptionalValueHolder< T >::m_u_value

The documentation for this class was generated from the following file: