SlHelpers
SlHelpers::LastErrorStream< More > Class Template Reference

Stores a string (usually an error string) to be retrieved later. More...

#include <LastError.h>

Inheritance diagram for SlHelpers::LastErrorStream< More >:
SlHelpers::LastErrorBase< More... >

Public Member Functions

LastErrorStreamreset () noexcept
 Wipe out everything.
 
template<typename T >
LastErrorStreamoperator<< (const T &x)
 Store something into this error. More...
 
std::string lastError () const noexcept
 Obtain the stored string. More...
 
- Public Member Functions inherited from SlHelpers::LastErrorBase< More... >
std::tuple_element_t< idx, Tuple > & get () noexcept
 Get n-th error member.
 
const std::tuple_element_t< idx, Tuple > & get () const noexcept
 Get n-th error member.
 
void set (Arg &&val) noexcept
 Set n-th error member.
 

Additional Inherited Members

- Protected Member Functions inherited from SlHelpers::LastErrorBase< More... >
void resetMembers () noexcept
 Wipe out members.
 

Detailed Description

template<typename... More>
class SlHelpers::LastErrorStream< More >

Stores a string (usually an error string) to be retrieved later.

This class uses a stringstream internally, so can be easilly appended.

Member Function Documentation

◆ lastError()

template<typename... More>
std::string SlHelpers::LastErrorStream< More >::lastError ( ) const
inlinenoexcept

Obtain the stored string.

Returns
The stored string.

◆ operator<<()

template<typename... More>
template<typename T >
LastErrorStream& SlHelpers::LastErrorStream< More >::operator<< ( const T &  x)
inline

Store something into this error.

Parameters
xWhat to store
Returns
This class with x stored.

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