MENU

Fun & Interesting

Functors() - Function objects - functions with state | Modern Cpp Series Ep. 99

Mike Shah 15,657 2 years ago
Video Not Working? Fix It Now

►Full C++ Series Playlist: https://www.youtube.com/playlist?list=PLvv0ScY6vfd8j-tlhYVPYgiIyXduu6m-L ►Find full courses on: https://courses.mshah.io/ ►Join as Member to Support the channel: https://www.youtube.com/channel/UCA64pZbN5Mz5NxC3SO4qpDg/join ►Lesson Description: In this lesson we learn about a concept that probably sounds scarier than it really should be -- functors. These are 'function objects' in which we can 'hold state' (because they are a class), but use exactly like a function. Where functors() really shine is by allowing us to compose or partially compose results, and we're soon going to find out that lambda's (unnamed functions) are essentially functors behind the scenes, but both lambda's and functors are incredibly useful tools for using with the STL. ►YouTube Channel: https://www.youtube.com/c/MikeShah ►Please like and subscribe to help the channel! ►Join our free community: https://courses.mshah.io/communities/Q29tbXVuaXR5LTI3MzAz

Comment