0

In this article in code sample I have met an unfamiliar for me C++ code construction:

[&]() {/* code here*/}

It looks just like anonymous function or class in Java. Does anyone know what this construction means?

scrutari
  • 1,378
  • 2
  • 17
  • 33

2 Answers2

0

It's a lambda function (an anonymous function that you can define inside another).

There's a pretty good SO post explaining it here. What is a lambda expression in C++11?

Community
  • 1
  • 1
maditya
  • 8,626
  • 2
  • 28
  • 28
  • 1
    Thank you for the answer. Since now I know that this is lambda I can see my question is a duplicate. – scrutari Mar 30 '13 at 10:30
0

It's a lambda function (C++11).