|
wren
Vulkan-based game engine
|
#include <boost/describe.hpp>#include <boost/preprocessor.hpp>#include <expected>#include <optional>#include <system_error>#include "enums.hpp"#include "macros.hpp"

Go to the source code of this file.
Classes | |
| class | wren::Err |
| struct | std::formatter< wren::Err, char > |
Namespaces | |
| namespace | wren |
Macros | |
| #define | DEFINE_ERROR_IMPL(CAT_NAME, ERROR_ENUM) |
| This macro creates the hooks into std::error_code for a given error enum. | |
| #define | DEFINE_ERROR(cat_name, name, ...) |
| #define | RESULT_UNIQUE_NAME() |
| #define | TRY_RESULT_IMPL(unique, expr) |
| #define | TRY_RESULT_1(unique, expr) |
| #define | TRY_RESULT_2(unique, out, expr) |
| #define | TRY_RESULT(...) |
| #define | TRY_RESULT_VOID_IMPL(unique, expr) |
| #define | TRY_RESULT_VOID_1(unique, expr) |
| #define | TRY_RESULT_VOID_2(unique, out, expr) |
| #define | TRY_RESULT_VOID(...) |
| #define | ERR_VAL_OR(out, err, on_err) |
| Checks a tl::expected for error and either sets the out param or runs the on_err. | |
| #define | ERR_VOID_OR(err, on_err) |
| Checks a tl::expected for error runs the on_err. | |
Typedefs | |
| template<typename T> | |
| using | wren::expected = std::expected<T, Err> |
| #define DEFINE_ERROR | ( | cat_name, | |
| name, | |||
| ... ) |
| #define DEFINE_ERROR_IMPL | ( | CAT_NAME, | |
| ERROR_ENUM ) |
This macro creates the hooks into std::error_code for a given error enum.
| #define ERR_VAL_OR | ( | out, | |
| err, | |||
| on_err ) |
Checks a tl::expected for error and either sets the out param or runs the on_err.
| out | A variable to save the resulting expected's value, on success |
| err | The expression resulting in an expected value |
| on_err | The expression to run if there's an error |
| #define ERR_VOID_OR | ( | err, | |
| on_err ) |
| #define RESULT_UNIQUE_NAME | ( | ) |
| #define TRY_RESULT | ( | ... | ) |
| #define TRY_RESULT_1 | ( | unique, | |
| expr ) |
| #define TRY_RESULT_2 | ( | unique, | |
| out, | |||
| expr ) |
| #define TRY_RESULT_IMPL | ( | unique, | |
| expr ) |
| #define TRY_RESULT_VOID | ( | ... | ) |
| #define TRY_RESULT_VOID_1 | ( | unique, | |
| expr ) |
| #define TRY_RESULT_VOID_2 | ( | unique, | |
| out, | |||
| expr ) |
| #define TRY_RESULT_VOID_IMPL | ( | unique, | |
| expr ) |