mercredi 1 janvier 2020

What is the type of a class name follow by parenthesis

I can't understand such syntax in https://github.com/hmenke/boost_matheval/blob/master/src/qi/parser.hpp#L43

struct bar {
    bar() {}
};

template<typename _T>
class foo {
public:
    foo() {}
};

...
foo<bar()> fb;
...

What is the type of _T in the specialization of the templates foo? How to use _T in foo?

Aucun commentaire:

Enregistrer un commentaire