Yesterday on SO:
A positive lambda: +[]{} -- What sorcery is this?
Does anyone know why this
#include <functional> int main() { auto test = +[]{}; // note the unary operator + before the lambda test = []{}; }works? It compiles fine with both GCC 4.7+ and Clang 3.2+. Is the code standard conforming?
Add a Comment
Comments are closed.