![]() |
MySQL 9.6.0
Source Code Documentation
|
Experimental API header. More...
#include <concepts>#include <functional>#include <optional>#include <type_traits>#include "mysql/utils/return_status.h"Go to the source code of this file.
Namespaces | |
| namespace | mysql |
| namespace | mysql::utils |
Macros | |
| #define | DEDUCED_NOEXCEPT_FUNCTION(X) noexcept(noexcept(X)) { return (X); } |
| Helper macro to define a function that returns the result of a single expression, and has a conditional noexcept clause deduced from whether that expression is noexcept or not. More... | |
Typedefs | |
| using | mysql::utils::Return_t = decltype(call_function()) |
Functions | |
| constexpr | mysql::utils::if (noexcept(function(std::forward< Args_t >(args)...))) |
| else constexpr | mysql::utils::if (std::same_as< Return_t, void >) |
| template<Shall_catch shall_catch, class Function_t , class... Args_t> | |
| decltype(auto) | mysql::utils::conditional_call_and_catch (const Function_t &function, Args_t &&...args) noexcept(noexcept(function(std::forward< Args_t >(args)...))||shall_catch==Shall_catch::yes) |
Call function, and if shall_catch is true, catch exceptions and wrap them in the return value. More... | |
Variables | |
| template<class Function_t , class... Args_t> | |
| mysql::utils::noexcept | |
| The return type for any call_and_catch(f, args...) call where f(args...) returns Type. More... | |
| mysql::utils::else | |
Experimental API header.
Helper macro to define a function that returns the result of a single expression, and has a conditional noexcept clause deduced from whether that expression is noexcept or not.
This expands to noexcept(noexcept(X)) { return (X); }.
See also Boost's BOOST_HOF_RETURNS.