What is a lambda expression type?
The type of lambda expression (the so-called closure ) is an unnamed class type with a function call operator automatically generated by the compiler. The internal name that the compiler will give is not specified.
According to clause 5.1.2 / 3 of the C ++ 11 standard:
The type of lambda expression (which is also the type of the closure object) is a unique, unnamed non-return type of the class โ called the closure type โ whose properties are described below. This type of class is not a collection (8.5.1). A closure type is declared in the smallest block area, in a class or namespace that contains the corresponding lambda expression. [...]
Also note that the member function name() class type_info (the type returned by typeid() ) is also implementation dependent, and the standard does not require it to be meaningful to humans.
In paragraph 18.7.1:
const char* name() const noexcept;
9 Returns: NTFS with implementation .
10 Notes: A message can be a multibyte string with a null character (17.5.2.1.4.2), suitable for conversion and display as wstring (21.3, 22.4.1.4)
Andy prowl
source share