载入中...
搜索中...
未找到
eve::detail::ResultObservation类 参考

Debug-only observation token shared by Result<T> specializations. 更多...

#include <Result.h>

类 eve::detail::ResultObservation 继承关系图:
eve::Result< T > eve::Result< void >

类

struct  InactiveTag
 Start an inactive token used while a Result move is constructed. 更多...
 

Public 成员函数

 ResultObservation () noexcept=default
 Constructs a ResultObservation.
 
 ResultObservation (const ResultObservation &)=delete
 
ResultObservation & operator= (const ResultObservation &)=delete
 
 ResultObservation (InactiveTag) noexcept
 
 ~ResultObservation () noexcept(false)
 

Protected 成员函数

void observe () const noexcept
 Observe.
 
void assertCanBeOverwritten () const
 Assert can be overwritten.
 
void adoptObservationFrom (ResultObservation &other) noexcept
 Adopt observation from.
 
void disarmObservation () noexcept
 Drop observation duty; used when a moved-from result is empty.
 
void requireObservation () noexcept
 Require a fresh check after replacing the carried outcome.
 

详细描述

Debug-only observation token shared by Result<T> specializations.

The token starts active for a newly-created Result. A move transfers its responsibility after payload movement succeeds; a moved-from Result is disarmed. The two bytes remain present in non-assert builds so Result keeps one ABI when a Release engine library is consumed by an assertion-enabled test or tool; the observation operations themselves compile to no-ops.

在文件 Result.h 第 32 行定义.

构造及析构函数说明

◆ ResultObservation() [1/3]

eve::detail::ResultObservation::ResultObservation ( )
defaultnoexcept

Constructs a ResultObservation.

◆ ResultObservation() [2/3]

eve::detail::ResultObservation::ResultObservation ( const ResultObservation &  )
delete

◆ ResultObservation() [3/3]

eve::detail::ResultObservation::ResultObservation ( InactiveTag  )
inlineexplicitnoexcept

在文件 Result.h 第 42 行定义.

◆ ~ResultObservation()

eve::detail::ResultObservation::~ResultObservation ( )
inline

在文件 Result.h 第 47 行定义.

引用了 EV_ASSERT.

成员函数说明

◆ adoptObservationFrom()

void eve::detail::ResultObservation::adoptObservationFrom ( ResultObservation &  other)
inlineprotectednoexcept

Adopt observation from.

在文件 Result.h 第 73 行定义.

◆ assertCanBeOverwritten()

void eve::detail::ResultObservation::assertCanBeOverwritten ( ) const
inlineprotected

Assert can be overwritten.

Ev assert.

在文件 Result.h 第 64 行定义.

引用了 EV_ASSERT.

◆ disarmObservation()

void eve::detail::ResultObservation::disarmObservation ( )
inlineprotectednoexcept

Drop observation duty; used when a moved-from result is empty.

在文件 Result.h 第 84 行定义.

◆ observe()

void eve::detail::ResultObservation::observe ( ) const
inlineprotectednoexcept

Observe.

在文件 Result.h 第 57 行定义.

◆ operator=()

ResultObservation & eve::detail::ResultObservation::operator= ( const ResultObservation &  )
delete

◆ requireObservation()

void eve::detail::ResultObservation::requireObservation ( )
inlineprotectednoexcept

Require a fresh check after replacing the carried outcome.

在文件 Result.h 第 91 行定义.


该类的文档由以下文件生成: