Block-Structured AMR Software Framework
amrex::IsCallable< T, Args > Struct Template Reference

Test if a given type T is callable with arguments of type Args... More...

#include <AMReX_TypeTraits.H>

Inheritance diagram for amrex::IsCallable< T, Args >:

Detailed Description

template<typename T, typename... Args>
struct amrex::IsCallable< T, Args >

Test if a given type T is callable with arguments of type Args...

This type trait is different from std::is_invocable since it only cares for the call syntax f(args...) and disregards pointers to class methods and such.

For consistency we use IsCallable over is_invocable since AMReX relies on call syntax everywhere else. Using an equivalent function to std::invoke would increase call stacks in debug mode, add more template instantiations and will obfuscate lots of generic code that takes functions.


The documentation for this struct was generated from the following file: