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 >

Check if a type is callable with ()-operator and given arguments.

Template Parameters
DFunction descriptor
RReturn 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 only FunctionObject types are allowed here while std::invocable_r also accepts pointers to member functions and pointers to data members (i.e. more general Callable 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 for Callable.

The documentation for this struct was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 23, 23:29, 2024)