([] () -> decltype(std::cout << "Hello")
This creates a lambda (function in place) with the same type of return expression as the expression std::cout << "Hello" has - this is std::ostream& . [] starts the lambda, () represents an empty list of parameters, -> pursues the return type, and decltype(X) equivalent to the type of the expression X. Then the body of the function:
{ return std::cout << "Hello"; }
Then a function is called ... that prints "Hello" and returns a stream ....
())
And finally, a little more text is sent to the returned stream ...
<< ", world!";
source share