May 2017
Intermediate to advanced
590 pages
17h 18m
English
The non-generic lambda expression shown on the second bullet earlier takes a constant integer and returns true if it is greater than 0, or false otherwise. The compiler defines an unnamed function object with the call operator having the signature of the lambda expression:
struct __lambda_name__ { bool operator()(int const n) const { return n > 0; } };
The way the unnamed function object is defined by the compiler depends on the way we define the lambda expression that can capture variables, use the mutable specifier or exception specifications, or have a trailing return type. The __lambda_name__ function object shown earlier is actually a simplification of what the compiler generates because it also defines a default ...
Read now
Unlock full access