DUNE PDELab (git)
Dune::IsCallable< D, R > Struct Template Reference
Check if a type is callable with ()-operator and given arguments. More...
Detailed Description
template<typename D, typename R = void>
struct Dune::IsCallable< D, R >
struct Dune::IsCallable< D, R >
Check if a type is callable with ()-operator and given arguments.
- Template Parameters
-
D Function descriptor R Return value type
If D = F(Args...)
this checks if F can be called with an argument list of type Args...
, and if the return value can be converted to R. If R is void
, any return type is accepted.
The result is encoded by deriving from either std::true_type
or std::false_type
If D is not of the form F(Args...)
this class is not defined.
- Note
- This differs from
std::invocable_r
in the way that onlyFunctionObject
types are allowed here whilestd::invocable_r
also accepts pointers to member functions and pointers to data members (i.e. more generalCallable
types) -
See https://en.cppreference.com/w/cpp/named_req/FunctionObject for the description of the named requirement
FunctionObject
and https://en.cppreference.com/w/cpp/named_req/Callable forCallable
.
The documentation for this struct was generated from the following file:
- dune/common/typetraits.hh
|
Legal Statements / Impressum |
Hosted by TU Dresden |
generated with Hugo v0.111.3
(Nov 23, 23:29, 2024)