SLIDE 1
- 15. C++ advanced (III): Functors and
Lambda
409
15. C++ advanced (III): Functors and Lambda 409 What do we learn - - PowerPoint PPT Presentation
15. C++ advanced (III): Functors and Lambda 409 What do we learn today? Functors: objects with overloaded function operator () . Closures Lambda-Expressions: syntactic sugar Captures 410 Functors: Motivation A simple output filter template
409
410
411
411
412
413
414
415
416
417
Of course this works, very similarly, using pointers 418
419
420
420
420
421
422
423
423
423
21Since C++14 also several returns possible, provided that the same return type is
deduced
424
425
425
426
426
427
427
428
429
430
430
430
431
431
432
432
433
433
434
435
http://en.cppreference.com/w/cpp/utility/functional/function
436
437
438
439
440