std::function: A Deep Dive Behind the Curtain - Lecture
Offered By: Meeting Cpp via YouTube
Course Description
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
Related Courses
How C++23 Changes the Way We Write CodeNDC Conferences via YouTube A Preview of C++ 23
NDC Conferences via YouTube Let's Talk About C++ Abstraction Layers
CppNow via YouTube Top 5 Library Additions in C++23
CppNow via YouTube mp-units - Lessons Learned and a New C++ Library Design
ACCU Conference via YouTube