Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there such a thing as a function template template parameter?

So I know C++ has a feature called "template template parameters", where you can pass a class template as a template parameter. For example:

template <typename T>
class vector { ... };

template <template <typename> class container>  // this is a template template parameter
class foo { ...  };

...

foo<vector> f;  // pass the vector template itself as template parameter

Is there an analogous thing for function templates? I.e. is there a way to pass a function template (for example, std::make_pair) as a template parameter to a class?

like image 768
HighCommander4 Avatar asked Feb 02 '23 15:02

HighCommander4


1 Answers

No.

like image 85
Alexandre C. Avatar answered Feb 05 '23 06:02

Alexandre C.