- [Instructor] Std::function also comes…from the functional header.…It is a wrapper for invokable objects…which includes functions, function objects,…also known as functors, and lambdas.…We can also store wrapped invokable objects…in a vector of function objects.…Let's take a look at some code to see how.…Again, we're going to start off with a file…that already includes our header.…So we've got functional, iostream, string, and vector.…We're using a namespace std.…And we're going to start up here, and we need to create…a few helper functions to get ourselves going.…
So the first one's going to be a void,…and it's going to be called demoFunction.…It doesn't take any parameters.…And the only thing this function does is call cout,…and it let's us know that demoFunction was called.…And then we do an endl, and that's the end of that.…The next function that we have here…is we're going to say void and call this function adder.…And it's going to take an int a and an int b.…
And once again it's going to do a cout,…and it's going to say Called adder comma a,…
- Unit testing and functional programming
- Function and Lambda functions
- C++ templates
- Working with the Standard Template Library and Boost.Hana
- Functional reactive programming
Skill Level Intermediate
2. Functional Programming in Modern C++
3. Template Metaprogramming
4. Functional Reactive Programming
RxCpp library5m 21s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.