C++泛型

0

/data/lifuren/core/src/source/config/Config.cpp: In lambda function:
/data/lifuren/core/src/source/config/Config.cpp:90:55: error: expected primary-expression before ‘>’ token
   90 |                         auto x = client.as<std::string>();
      |                                                       ^
/data/lifuren/core/src/source/config/Config.cpp:90:57: error: expected primary-expression before ‘)’ token
   90 |                         auto x = client.as<std::string>();
      |                                                         ^
/data/lifuren/core/src/source/config/Config.cpp: In lambda function:
/data/lifuren/core/src/source/config/Config.cpp:25:55: error: expected primary-expression before ‘>’ token
   25 |         const std::string& vk = v.first.as<std::string>();          \

C++lambda表达式中泛型需要主动声明v.first.template as<std::string>()