iceoryx2
C++ Language 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 >
constexpr iox2::bb::stl::detail::OptionalValueHolder< T >::OptionalValueHolder ( )
inlineconstexprnoexcept

Definition at line 59 of file optional.hpp.

◆ OptionalValueHolder() [2/5]

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

Definition at line 62 of file optional.hpp.

◆ OptionalValueHolder() [3/5]

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

Definition at line 66 of file optional.hpp.

◆ OptionalValueHolder() [4/5]

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

◆ OptionalValueHolder() [5/5]

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

Definition at line 77 of file optional.hpp.

◆ ~OptionalValueHolder()

Definition at line 85 of file optional.hpp.

Member Function Documentation

◆ is_empty()

◆ operator=() [1/2]

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

Definition at line 101 of file optional.hpp.

◆ operator=() [2/2]

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

Definition at line 89 of file optional.hpp.

◆ reset()

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

◆ set() [1/2]

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

Definition at line 129 of file optional.hpp.

◆ set() [2/2]

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

Definition at line 118 of file optional.hpp.

Referenced by iox2::bb::stl::Optional< T >::emplace().

◆ unchecked_get() [1/4]

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

Definition at line 150 of file optional.hpp.

◆ unchecked_get() [2/4]

◆ unchecked_get() [3/4]

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

Definition at line 155 of file optional.hpp.

◆ unchecked_get() [4/4]

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

Definition at line 145 of file optional.hpp.

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.

◆ 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: