NIM 跨平台 C++ SDK
载入中...
搜索中...
未找到
nstd::_optional< T > 模板结构体 参考

#include <ne_stl_optional.h>

类 nstd::_optional< T > 继承关系图:
nstd::_optional_base< T >

Public 类型

using _base_t = _optional_base< T >
 

Public 成员函数

 _optional ()=default
 
 _optional (const _optional &other)
 
 _optional (const T &value)
 
 _optional (std::nullptr_t)
 
 _optional (std::nullopt_t)
 
template<class TValue >
 _optional (const std::optional< TValue > &other)
 
template<class TValue >
 operator std::optional< TValue > () const
 
template<class TValue >
 operator _optional< TValue > () const
 
template<class TValue >
 _optional (const TValue *other)
 
template<class TValue >
_optionaloperator= (const TValue *value)
 
_optionaloperator= (const char *value)
 
_optionaloperator= (std::nullptr_t)
 
_optionaloperator= (std::nullopt_t)
 
template<class TValue >
_optionaloperator= (const std::optional< TValue > &other)
 
_optionaloperator= (const T &value)
 
_optionaloperator= (const _optional &other)
 
template<class TValue >
_optionaloperator= (const TValue &value)
 
template<class TValue >
_optionaloperator= (const _optional< TValue > &other)
 
bool operator== (const _optional &other) const
 
bool operator!= (const _optional &other) const
 
void reset ()
 
const T & value () const &
 
value_or (T &&default_value) const &
 
bool has_value () const
 
 operator bool () const
 
const T * operator-> () const
 
T * operator-> ()
 
const T & operator* () const &
 
T & operator* () &
 
const T && operator* () const &&
 
T && operator* () &&
 

Public 属性

bool has_value_
 
value_
 
- Public 属性 继承自 nstd::_optional_base< T >
bool has_value_ {false}
 
value_
 

成员类型定义说明

◆ _base_t

template<class T >
using nstd::_optional< T >::_base_t = _optional_base<T>

构造及析构函数说明

◆ _optional() [1/7]

template<class T >
nstd::_optional< T >::_optional ( )
default

◆ _optional() [2/7]

template<class T >
nstd::_optional< T >::_optional ( const _optional< T > &  other)
inline

◆ _optional() [3/7]

template<class T >
nstd::_optional< T >::_optional ( const T &  value)
inline

◆ _optional() [4/7]

template<class T >
nstd::_optional< T >::_optional ( std::nullptr_t  )
inline

◆ _optional() [5/7]

template<class T >
nstd::_optional< T >::_optional ( std::nullopt_t  )
inline

◆ _optional() [6/7]

template<class T >
template<class TValue >
nstd::_optional< T >::_optional ( const std::optional< TValue > &  other)
inline

◆ _optional() [7/7]

template<class T >
template<class TValue >
nstd::_optional< T >::_optional ( const TValue *  other)
inline

成员函数说明

◆ has_value()

template<class T >
bool nstd::_optional< T >::has_value ( ) const
inline

◆ operator _optional< TValue >()

template<class T >
template<class TValue >
nstd::_optional< T >::operator _optional< TValue > ( ) const
inline

◆ operator bool()

template<class T >
nstd::_optional< T >::operator bool ( ) const
inline

◆ operator std::optional< TValue >()

template<class T >
template<class TValue >
nstd::_optional< T >::operator std::optional< TValue > ( ) const
inline

◆ operator!=()

template<class T >
bool nstd::_optional< T >::operator!= ( const _optional< T > &  other) const
inline

◆ operator*() [1/4]

template<class T >
T & nstd::_optional< T >::operator* ( ) &
inline

◆ operator*() [2/4]

template<class T >
T && nstd::_optional< T >::operator* ( ) &&
inline

◆ operator*() [3/4]

template<class T >
const T & nstd::_optional< T >::operator* ( ) const &
inline

◆ operator*() [4/4]

template<class T >
const T && nstd::_optional< T >::operator* ( ) const &&
inline

◆ operator->() [1/2]

template<class T >
T * nstd::_optional< T >::operator-> ( )
inline

◆ operator->() [2/2]

template<class T >
const T * nstd::_optional< T >::operator-> ( ) const
inline

◆ operator=() [1/9]

template<class T >
_optional & nstd::_optional< T >::operator= ( const _optional< T > &  other)
inline

◆ operator=() [2/9]

template<class T >
template<class TValue >
_optional & nstd::_optional< T >::operator= ( const _optional< TValue > &  other)
inline

◆ operator=() [3/9]

template<class T >
_optional & nstd::_optional< T >::operator= ( const char *  value)
inline

◆ operator=() [4/9]

template<class T >
template<class TValue >
_optional & nstd::_optional< T >::operator= ( const std::optional< TValue > &  other)
inline

◆ operator=() [5/9]

template<class T >
_optional & nstd::_optional< T >::operator= ( const T &  value)
inline

◆ operator=() [6/9]

template<class T >
template<class TValue >
_optional & nstd::_optional< T >::operator= ( const TValue &  value)
inline

◆ operator=() [7/9]

template<class T >
template<class TValue >
_optional & nstd::_optional< T >::operator= ( const TValue *  value)
inline

◆ operator=() [8/9]

template<class T >
_optional & nstd::_optional< T >::operator= ( std::nullopt_t  )
inline

◆ operator=() [9/9]

template<class T >
_optional & nstd::_optional< T >::operator= ( std::nullptr_t  )
inline

◆ operator==()

template<class T >
bool nstd::_optional< T >::operator== ( const _optional< T > &  other) const
inline

◆ reset()

template<class T >
void nstd::_optional< T >::reset ( )
inline

◆ value()

template<class T >
const T & nstd::_optional< T >::value ( ) const &
inline

◆ value_or()

template<class T >
T nstd::_optional< T >::value_or ( T &&  default_value) const &
inline

类成员变量说明

◆ has_value_

template<class T >
bool nstd::_optional_base< T >::has_value_

◆ value_

template<class T >
T nstd::_optional_base< T >::value_

该结构体的文档由以下文件生成: