|
MGIS 3.1.0
|
This header declares the invoke function to call function objects that may throw exceptions. More...
#include <optional>#include <functional>#include <type_traits>#include "MGIS/Config.hxx"#include "MGIS/InvalidResult.hxx"#include "MGIS/Context.hxx"#include "MGIS/Utilities/Invoke.ixx"Namespaces | |
| namespace | mgis |
| the namespace mgis encloses all the MGIS project. | |
Macros | |
| #define | MGIS_INVOKE(e, ...) |
| a simple wrapper around the invoke function which handles the declaration of the source location if needed | |
| #define | MGIS_INVOKE_CHECK_ERRNO(e, ...) |
| #define | MGIS_TRY_INVOKE_VOID(e, ...) |
| a simple wrapper around the invoke function when the returned type of the callable is void | |
| #define | MGIS_TRY_INVOKE_VOID_CHECK_ERRNO(e, ...) |
| #define | MGIS_TRY_INVOKE(v, e, ...) |
| a simple wrapper around the invoke function | |
| #define | MGIS_TRY_INVOKE_CHECK_ERRNO(v, e, ...) |
Typedefs | |
| template<typename F, typename... ArgumentsTypes> | |
| using | mgis::invoke_result_t |
| a simple alias | |
Functions | |
| template<typename F, typename... ArgumentsTypes> | |
| invoke_result_t< F, ArgumentsTypes... > | mgis::invoke (Context &, F &&, ArgumentsTypes &&...) MGIS_NOEXCEPT |
| invoke the given callable object param[inout] ctx: execution context | |
| template<typename F, typename... ArgumentsTypes> | |
| invoke_result_t< F, ArgumentsTypes... > | mgis::invokeCheckErrno (Context &, F &&, ArgumentsTypes &&...) MGIS_NOEXCEPT |
This header declares the invoke function to call function objects that may throw exceptions.
| #define MGIS_INVOKE | ( | e, | |
| ... ) |
a simple wrapper around the invoke function which handles the declaration of the source location if needed
| [in,out] | ctx | execution context |
| #define MGIS_INVOKE_CHECK_ERRNO | ( | e, | |
| ... ) |
| #define MGIS_TRY_INVOKE | ( | v, | |
| e, | |||
| ... ) |
a simple wrapper around the invoke function
| [in,out] | ctx | execution context |
| [out] | v | variable name which will contain the returned value of the function invoked. This variable is declared inside the macro and so must not be declared before. |
| #define MGIS_TRY_INVOKE_CHECK_ERRNO | ( | v, | |
| e, | |||
| ... ) |
| #define MGIS_TRY_INVOKE_VOID | ( | e, | |
| ... ) |
a simple wrapper around the invoke function when the returned type of the callable is void
| [in,out] | ctx | execution context |
| #define MGIS_TRY_INVOKE_VOID_CHECK_ERRNO | ( | e, | |
| ... ) |