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?
No.
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