Is there direct way to do the following:
template < class >
stru开发者_开发技巧ct f {};
template < class F >
void function() {
F<int>(); //for example
// ? F template <int>();
}
function < f >();
I have workaround by using extra class around template struct. I am wondering if it's possible to do so directly.
Thanks
The proper syntax for template template-parameters is as follows
template < class > struct f {};
template < template <class> class F >
void function() {
F<int>(); //for example
}
...
function < f >()
精彩评论