C++Spec 1.0.0
BDD testing for C++
Loading...
Searching...
No Matches
CppSpec::Let< T > Class Template Reference

A container that memoizes the result of a block in `it's. More...

#include <let.hpp>

Inheritance diagram for CppSpec::Let< T >:
Collaboration diagram for CppSpec::Let< T >:

Public Member Functions

 Let (block_t body) noexcept
 
T * operator-> ()
 
T & operator* () &
 
T & value () &
 Get the value contained in the Let.
 
- Public Member Functions inherited from CppSpec::LetBase
 LetBase (const LetBase &copy)=default
 
void reset () noexcept
 
constexpr bool has_result () const noexcept
 

Additional Inherited Members

- Protected Attributes inherited from CppSpec::LetBase
bool delivered {false}
 

Detailed Description

template<typename T>
class CppSpec::Let< T >

A container that memoizes the result of a block in `it's.

@tparm T the type of the object that the Let will contain, aka return type of the block.

Member Function Documentation

◆ value()

template<typename T>
T & CppSpec::Let< T >::value ( ) &

Get the value contained in the Let.

Returns
a reference to the returned object of the let statement

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