SlHelpers
Loading...
Searching...
No Matches
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.
std::string lastError () const noexcept
 Obtain the stored string.
Public Member Functions inherited from SlHelpers::LastErrorBase< More... >
std::tuple_element_t< idx, Tuple > & get () 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:
  • /home/abuild/rpmbuild/BUILD/slhelpers-20260428.f233ce9-build/slhelpers-20260428.f233ce9/include/helpers/LastError.h