C++ Lambdas Part 1 - Unnamed function objects (closures) in C++ | Modern Cpp Series Ep. 100!!!

preview_player
Показать описание

►Lesson Description: In this lesson you are going to get an introduction to lambda's -- a powerful tool for building more composable programs and taking advantage of other building blocks like the algorithm library in the STL. I'll also show you that lamabda's are 'unnamed function objects' (not just unnamed functions), and it is important to have that distinguishment so you understand the implementation, but also that lambda's can capture state -- just like function objects!

►Please like and subscribe to help the channel!
Рекомендации по теме
Комментарии
Автор

Mike, you look like a man with good knowledge of Cpp and programming in general, I hope your channel one day get the number of subscriber and viewers it deserves.

CPP_malloc
Автор

much love man, wish my professors were able to explain things like you do 💜

Marzexx
Автор

Thank you for your work! You are helping me and all other C++ learners a lot by making those videos! :)
You motivated me switching to linux and working on vim while I work on my exercises for my portfolio!

Keep up with the good stuff, kind sir! <3

legendarytwister
Автор

Last two minutes of the video saved my life, thanks man 😅

tbeng
Автор

I've got a feeling this might be one of the most important in the whole amazing series. Thank you so very much 🎉❤🙏

VoidloniXaarii
Автор

I was literally saying that closures are specifically unnameable functors... (Which is not always technically the case if I understand lambda calculus correctly) B4 you even started saying pop quiz

skeleton_craftGaming
Автор

I loved it. thanks Mike, you are superfast.

AjayKushwaha-vivg
Автор

at 10:34 ... I find the C++ compiler interesting. Both print_v and print_functor use n and it receives n as a parameter. Yet the for_each command does not seem to pass any parameter to the lambda or other function.

xarzu
Автор

Mike, do you offer one on one tutoring in C++? I've been through a couple of job interviews recently and always fall just short of success during them. Whether it be via hackerrank sessions, live coding, or knowledge. I wanted to see if maybe you offered a service to help prepare for these things in a more 1-1 manner.

robertstrickland
Автор

You are awesome. Can you do a series on Design patterns soon.

wika
Автор

[](){}; // these are not just braces, but also correct code in c++. hehe

ghulam
Автор

I know it's an introduction, but I don't think you did someone watching any favours by capturing an int by reference. If you were capturing the vector, sure [&], but for the int especially with the way you were using it, [=] would have been better.

thewelder