Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the proper term for non-function-pointers in C++?

Tags:

c++

templates

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"?

Update:

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.

like image 331
void.pointer Avatar asked Aug 16 '11 16:08

void.pointer


1 Answers

Yes, the term is "function type".

like image 52
Mike Seymour Avatar answered Sep 29 '22 10:09

Mike Seymour