Pasha Bibko Util Library
|
Class to create when a function fails. More...
#include <ReturnVal.h>
Public Member Functions | |
FunctionFail (Err_Ty _error) | |
Constructor that copies an error and stores it. | |
template<typename... Args> requires std::is_constructible_v<Err_Ty, Args...> | |
FunctionFail (Args &&... args) | |
Constructor that creates the error within the class. | |
Public Attributes | |
Err_Ty | error |
The error that the function is returning. | |
Class to create when a function fails.
This class has no functionality and is just used to help distinguish between Function fails and success when using Util::ReturnVal.
Err_Ty | The type of the error (cannot be void). |
|
inlineexplicit |
Constructor that copies an error and stores it.
|
inlineexplicit |
Constructor that creates the error within the class.
Constructs the error object within the class instead of copying for higher performance, recommended for large error types. Will only show as a valid function if the parameters passed to the function can be used to construct the error type.
args | The arguments that will be used to create the error object. |