C++ template compilation error: expected primary-expression before ‘>’ token [duplicate]

You need to do:

std::cout << pt.template get<std::string>("path");

Use template in the same situation as typename, except for template members instead of types.

(That is, since pt::get is a template member dependent on a template parameter, you need to tell the compiler it’s a template.)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)