OpenMiner  0.0.1a
Voxel game engine
Public Member Functions | Public Attributes | List of all members
sol::constexpr_optional_base< T > Struct Template Reference

#include <sol.hpp>

Public Member Functions

constexpr constexpr_optional_base () noexcept
 
constexpr constexpr_optional_base (const T &v)
 
constexpr constexpr_optional_base (T &&v)
 
template<class... Args>
constexpr constexpr_optional_base (in_place_t, Args &&... args)
 
template<class U , class... Args, TR2_OPTIONAL_REQUIRES(::std::is_constructible< T, ::std::initializer_list< U >>) >
OPTIONAL_CONSTEXPR_INIT_LIST constexpr_optional_base (in_place_t, ::std::initializer_list< U > il, Args &&... args)
 
Tstorage ()
 
constexpr const Tstorage () const
 
 ~constexpr_optional_base ()=default
 

Public Attributes

char storage_ [sizeof(T)]
 
bool init_
 

Constructor & Destructor Documentation

§ constexpr_optional_base() [1/5]

template<class T >
constexpr sol::constexpr_optional_base< T >::constexpr_optional_base ( )
inlinenoexcept
3572  : storage_(), init_(false) {
3573  }
bool init_
Definition: sol.hpp:3570
char storage_[sizeof(T)]
Definition: sol.hpp:3569

§ constexpr_optional_base() [2/5]

template<class T >
constexpr sol::constexpr_optional_base< T >::constexpr_optional_base ( const T v)
inlineexplicit
3576  : storage_(), init_(true) {
3577  new (&storage()) T(v);
3578  }
T & storage()
Definition: sol.hpp:3601
bool init_
Definition: sol.hpp:3570
char storage_[sizeof(T)]
Definition: sol.hpp:3569

§ constexpr_optional_base() [3/5]

template<class T >
constexpr sol::constexpr_optional_base< T >::constexpr_optional_base ( T &&  v)
inlineexplicit
3581  : storage_(), init_(true) {
3582  new (&storage()) T(constexpr_move(v));
3583  }
constexpr ::std::remove_reference< T >::type && constexpr_move(T &&t) noexcept
Definition: sol.hpp:3443
T & storage()
Definition: sol.hpp:3601
bool init_
Definition: sol.hpp:3570
char storage_[sizeof(T)]
Definition: sol.hpp:3569

§ constexpr_optional_base() [4/5]

template<class T >
template<class... Args>
constexpr sol::constexpr_optional_base< T >::constexpr_optional_base ( in_place_t  ,
Args &&...  args 
)
inlineexplicit
3587  : init_(true), storage_() {
3588  new (&storage()) T(constexpr_forward<Args>(args)...);
3589  }
T & storage()
Definition: sol.hpp:3601
bool init_
Definition: sol.hpp:3570
char storage_[sizeof(T)]
Definition: sol.hpp:3569

§ constexpr_optional_base() [5/5]

template<class T >
template<class U , class... Args, TR2_OPTIONAL_REQUIRES(::std::is_constructible< T, ::std::initializer_list< U >>) >
OPTIONAL_CONSTEXPR_INIT_LIST sol::constexpr_optional_base< T >::constexpr_optional_base ( in_place_t  ,
::std::initializer_list< U >  il,
Args &&...  args 
)
inlineexplicit
3593  : init_(true), storage_() {
3594  new (&storage()) T(il, constexpr_forward<Args>(args)...);
3595  }
T & storage()
Definition: sol.hpp:3601
bool init_
Definition: sol.hpp:3570
char storage_[sizeof(T)]
Definition: sol.hpp:3569

§ ~constexpr_optional_base()

template<class T >
sol::constexpr_optional_base< T >::~constexpr_optional_base ( )
default

Member Function Documentation

§ storage() [1/2]

template<class T >
T& sol::constexpr_optional_base< T >::storage ( )
inline
3601  {
3602  return (*reinterpret_cast<T*>(&storage_[0]));
3603  }
char storage_[sizeof(T)]
Definition: sol.hpp:3569

§ storage() [2/2]

template<class T >
constexpr const T& sol::constexpr_optional_base< T >::storage ( ) const
inline
3605  {
3606  return (*reinterpret_cast<T const*>(&storage_[0]));
3607  }
char storage_[sizeof(T)]
Definition: sol.hpp:3569

Member Data Documentation

§ init_

template<class T >
bool sol::constexpr_optional_base< T >::init_

§ storage_

template<class T >
char sol::constexpr_optional_base< T >::storage_[sizeof(T)]

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