[C++] Lambda Function
·
C/C++
What's Lambda? Lambda is Function Object When to use? 한번 쓰고 말 간단한 함수 ex) sort compare , set || priority queue costructor comporator 클로저 기법을 통한 Function Object 생성 #include using namespace std; class LambdaTest { private: int localVariable; public: // this is closure explicit LambdaTest(int a) : localVariable{a} {}; int LambdaTest::operator()(int x) const { // function object return return localVa..