|
Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
|
Wrapper for void result. More...
#include <error_handling.h>

Public Member Functions | |
| result_void ()=default | |
| Constructs a successful result. | |
| result_void (const error &err) | |
| Constructs a result with an error. | |
| bool | has_error () const noexcept |
| Checks if the result contains an error. | |
| bool | has_value () const noexcept |
| Checks if the result is successful (has a value) | |
| bool | is_ok () const noexcept |
| Checks if the result is successful. | |
| bool | is_error () const noexcept |
| Checks if the result contains an error. | |
| const error & | get_error () const |
| Gets the error. | |
| operator bool () const noexcept | |
| Converts to bool for condition checking. | |
Private Attributes | |
| bool | has_error_ = false |
| error | error_ {error_code::success, ""} |
Wrapper for void result.
This class represents a result that doesn't return a value (void), but can indicate success or failure.
Definition at line 187 of file error_handling.h.
|
default |
Constructs a successful result.
|
inline |
Constructs a result with an error.
| err | The error |
Definition at line 198 of file error_handling.h.
|
inlinenodiscard |
Gets the error.
Definition at line 231 of file error_handling.h.
References error_.
|
inlinenodiscardnoexcept |
Checks if the result contains an error.
Definition at line 204 of file error_handling.h.
References has_error_.
|
inlinenodiscardnoexcept |
Checks if the result is successful (has a value)
Definition at line 211 of file error_handling.h.
References has_error_.
|
inlinenodiscardnoexcept |
Checks if the result contains an error.
Definition at line 225 of file error_handling.h.
References has_error_.
|
inlinenodiscardnoexcept |
Checks if the result is successful.
Definition at line 218 of file error_handling.h.
References has_error_.
|
inlineexplicitnoexcept |
Converts to bool for condition checking.
Definition at line 237 of file error_handling.h.
References has_error_.
|
private |
|
private |
Definition at line 240 of file error_handling.h.
Referenced by has_error(), has_value(), is_error(), is_ok(), and operator bool().