Finite Volume Solver
prototype
A framework to build finite volume solvers for the AG Klein at the Freie Universität Berlin.
|
An efficient, type-erasing, non-owning reference to a callable. More...
#include <function_ref.hpp>
Public Member Functions | |
template<typename Callable , typename = std::enable_if_t<IsInvocable<Callable, Ret, Params...>::value>> | |
function_ref (Callable &&callable, typename std::enable_if< !std::is_same< typename std::remove_reference< Callable >::type, function_ref >::value >::type *=nullptr) | |
Ret | operator() (Params... params) const |
Static Private Member Functions | |
template<typename Callable > | |
static Ret | callback_fn (std::intptr_t callable, Params... params) |
Private Attributes | |
Ret(* | callback )(std::intptr_t callable, Params... params) |
std::intptr_t | callable |
An efficient, type-erasing, non-owning reference to a callable.
This is intended for use as the type of a function parameter that is not used after the function in question returns.
This class does not own the callable, so it is not in general safe to store a function_ref.
|
inline |
|
inlinestaticprivate |
|
inline |
|
private |
|
private |