I have a class template with a member function that has lambda that wants to use the class template parameter type. It does not compile inside lambda, but succeeds, as expected, outside of lambda.
struct wcout_reporter { static void report(const std::wstring& output) { std::wcout << output << std::endl; } }; template <typename reporter = wcout_reporter> class agency { public: void report_all() { reporter::report(L"dummy");
Compilation Error:
error C2653: 'reporter' : is not a class or namespace name
Why can't I access the class template parameter type inside the lambda member function?
What do I need to do to access the template template parameter type inside the lambda member function?
source share