SlHelpers
SlHelpers::LastErrorStr< More > Class Template Reference

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

#include <LastError.h>

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

Public Member Functions

LastErrorStrreset () noexcept
 Wipe out everything.
 
template<typename T >
void setError (T &&str) requires(std
 Store a string into this error. More...
 
const 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::LastErrorStr< More >

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

This class uses a string internally.

Member Function Documentation

◆ lastError()

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

Obtain the stored string.

Returns
The stored string.

◆ setError()

template<typename... More>
template<typename T >
void SlHelpers::LastErrorStr< More >::setError ( T &&  str)
inline

Store a string into this error.

Parameters
strThe string to store

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