Thinking of lambda expressions as \'syntactic sugar\' for callable objects, can the unnamed underlying type be expressed?
An example:
struct gt {
In Microsoft Visual Studio at least (I haven't tried this with other compilers), and if you don't capture anything, the type seems to be a regular function pointer:
std::string (*myFunctionPointer)(int x) = [] (int x) {
char buffer[10];
return std::string("Test ") + itoa(x, buffer, 10);
};
std::string testOutput = myFunctionPointer(123);