|
by Dustin Campbell via Did it with .NET on 3/4/2010 3:42:19 PM
A few weeks ago, some of my colleagues and I were discussing the idiosyncrasies of
various programming languages (as we often find ourselves doing—we’re kind of geeky
that way), when one of us pointed out that the following code is completely valid C++0x syntax:
[](){}();
The “operator soup”1 above defines a C++
lambda expression (denoted by the square brackets) which declares no parameters
(the first empty parentheses) or body (the empty curly braces) and
... [ read more ]
|