Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

std::function: A Deep Dive Behind the Curtain - Lecture

Meeting Cpp via YouTube

Overview

Dive deep into the intricacies of std::function in C++ with this comprehensive conference talk from Meeting C++ 2022. Explore the evolution of std::function from its Boost origins to its inclusion in the C++11 Standard Template Library, and learn about the upcoming std::move_only_function in C++23. Gain insights into function signatures, function pointers, and the versatility of std::function. Discover the caveats and limitations of these tools, and understand how to leverage std::invoke, introduced in C++17, to create custom derivatives. Examine various implementation approaches, including object-oriented and objective-ended methods, and analyze benchmarks and size considerations. Investigate advanced topics such as empty states, member functions, and multiple overloads. Conclude with a discussion on move-only functions and their implications for modern C++ programming.

Syllabus

Introduction
Function signatures
Function pointer
Summary
Why use std function
Function pointers
Instance method
Objectoriented approach
Objectiveended approach
devils advocate
task scheduler
wrap up
naive implementation
call operator
callable
recap
question
comparison
empty state
compare pointer
member function
return type
member pointers
function signature
member functions
target type
summary and comments
standard mandates
other implementations
benchmarks
size
pointer size
extensions
call qualifiers
multiple overloads
different overloads
more ideas
moveonly function
conclusion
our company
user group

Taught by

Meeting Cpp

Reviews

Start your review of std::function: A Deep Dive Behind the Curtain - Lecture

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.