In C++ you can pass in "function types", which are like function pointers but they are just the type of the function and not a pointer to it. For example:
template< typename T >
class MyTemplateClass
{
// ...
};
// ... and later...
MyTemplateClass<void (int, int)> mtc;
What is the proper name for this form? Is this a "Function Type"?
I edited my example to be a little more clear. However, keep in mind the main part of the sample I'm trying to point out is the void (int, int)
part.
Yes, the term is "function type".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With