Uploaded September 2024 | Updated December 2026, 3 hours ago
cppnow.org
---
C++ Zero Overhead Pass by Value Through Invocable C++ Abstractions - Filipp Gelman - C++Now 2024
---
This presentation focuses on what happens when non-trivial objects are passed to functions by value. Often this necessitates calling the copy or move constructor of the object's type. This call can be elided when the argument is a prvalue, such as when it is the result of another function or a temporary object of the expected type. The constructor can be elided even if the target function happens to be virtual.
But this doesn't work when invoking a std::function, std::move_only_function, std::function_ref, or even std::reference_wrapper. When the target of these abstractions takes objects by value, there will be at least one additional copy/move of the arguments even if they are prvalues.
But what if this were not the case?
This presentation will explain why library-level abstractions incur the overhead of an additional copy/move, and present a technique for avoiding this overhead. The following extreme example proves the point:
function<void(lock_guard by_value)>([](lock_guard by_value){});
---
Slides: github.com/boostcon/cppnow_presentations_2024/blob/main/Presentations/Zero_Overhead_Pass_By_Value_Through_Invocable_Abstractions.pdf
---
Filipp Gelman
At Bloomberg LP since 2016, Filipp enjoys exploring the obscure, arcane, and esoteric corners of the C++ language. He is known among his coworkers for heavy use of templates, emphasis on compile time computation, and abusing language features for nefarious purposes.
---
C++Now 2025 - 28th April - 2nd May
C++Now is an annual onsite international C++ programming and coding conference held in Aspen, Colarado. For all C++ developers, C++ software engineers and those involved with the C++ language, CppNow provides an indepth and technical content provided by the best and brightest C++ experts of the C++ world.
Annual CppNow Conference - cppnow.org
linkedin.com/company/cppnow
twitter.com/cppnow
facebook.com/CppNow
reddit.com/r/CppNow
https://mastodon.social/@cppnow
think-cell develops one of the world’s leading PowerPoint applications, with C++ at the core of everything we build, from layout algorithms to deep integration with Microsoft Office. Interested in working on challenging C++ problems with real-world impact? Explore our open roles: think-cell.com/en/career/tech
---
Videos Filmed & Edited By Bash Films: bashfilms.com
YouTube Channel Managed & Optimized By Digital Medium Ltd: events.digital-medium.co.uk
---
#boost #cpp #cppprogramming #cplusplus #softwaredeveloper
cppnow.org
---
C++ Zero Overhead Pass by Value Through Invocable C++ Abstractions - Filipp Gelman - C++Now 2024
---
This presentation focuses on what happens when non-trivial objects are passed to functions by value. Often this necessitates calling the copy or move constructor of the object's type. This call can be elided when the argument is a prvalue, such as when it is the result of another function or a temporary object of the expected type. The constructor can be elided even if the target function happens to be virtual.
But this doesn't work when invoking a std::function, std::move_only_function, std::function_ref, or even std::reference_wrapper. When the target of these abstractions takes objects by value, there will be at least one additional copy/move of the arguments even if they are prvalues.
But what if this were not the case?
This presentation will explain why library-level abstractions incur the overhead of an additional copy/move, and present a technique for avoiding this overhead. The following extreme example proves the point:
function<void(lock_guard by_value)>([](lock_guard by_value){});
---
Slides: github.com/boostcon/cppnow_presentations_2024/blob/main/Presentations/Zero_Overhead_Pass_By_Value_Through_Invocable_Abstractions.pdf
---
Filipp Gelman
At Bloomberg LP since 2016, Filipp enjoys exploring the obscure, arcane, and esoteric corners of the C++ language. He is known among his coworkers for heavy use of templates, emphasis on compile time computation, and abusing language features for nefarious purposes.
---
C++Now 2025 - 28th April - 2nd May
C++Now is an annual onsite international C++ programming and coding conference held in Aspen, Colarado. For all C++ developers, C++ software engineers and those involved with the C++ language, CppNow provides an indepth and technical content provided by the best and brightest C++ experts of the C++ world.
Annual CppNow Conference - cppnow.org
linkedin.com/company/cppnow
twitter.com/cppnow
facebook.com/CppNow
reddit.com/r/CppNow
https://mastodon.social/@cppnow
think-cell develops one of the world’s leading PowerPoint applications, with C++ at the core of everything we build, from layout algorithms to deep integration with Microsoft Office. Interested in working on challenging C++ problems with real-world impact? Explore our open roles: think-cell.com/en/career/tech
---
Videos Filmed & Edited By Bash Films: bashfilms.com
YouTube Channel Managed & Optimized By Digital Medium Ltd: events.digital-medium.co.uk
---
#boost #cpp #cppprogramming #cplusplus #softwaredeveloper









![Welcome to v1.0 of the meta::[[verse]]! - Inbal Levi - C++Now 2025
https://www.cppnow.org
Welcome to v1.0 of the meta::[[verse]]! - Inbal Levi - C++Now 2025
This talk will introduce what is (likely) the final version of the Reflection feature targeting C++26.
With a proposal to introduce reflection to C++26 (including the “std::meta” namespace) slated to be voted into the standard in June 2025, we can already start imagining a whole new world of possibilities.
In this session, we will dive into reflection and its transformative potential within our codebases. We will start with a brief history of reflection history. Well continue with an introduction of utilities from the latest reflection proposal. Then, we delve deeper into practical applications and demonstrate solutions to problems that commonly use reflection and the power it holds. For the last part, we will explore the possibilities within “Reflection Libraries”. This includes both “traditional” libraries which provide functionality, and more “novel” approaches which reshape users’ code. We will look at examples of what such libraries can cover, and demonstrate potential directions the future holds. Last but not least, we will discuss how Reflection may impact the way we manage our codebases and the delivery process.
Join us as we traverse the meta::[[verse]]!
Slides: https://slides.com/inballevi/welcome-to-v1-0-of-the-meta-verse-cpp-now
think-cell develops one of the world’s leading PowerPoint applications, with C++ at the core of everything we build, from layout algorithms to deep integration with Microsoft Office. Interested in working on challenging C++ problems with real-world impact? Explore our open roles: https://www.think-cell.com/en/career/tech
Inbal Levi
Inbal Levi is a Lead Software Engineer at Microsoft with an interest in code readability, compilers, language and software design.
She is an active member of the ISO C++ Standards Committee as Library Evolution Work Group Chair, and as the ISO C++ Israeli NB Chair.
Inbal is also a director at ISO C++ Foundation and the Boost Foundation and puts effort into evolving both the local and international C++ communities, as an organizer of the CoreC++ conference and meetup group, and as the program chair of C++Now.
C++Now 2026 - 4th May - 8th May
C++Now is an annual onsite international C++ programming and coding conference held in Aspen, Colarado. For all C++ developers, C++ software engineers and those involved with the C++ language, CppNow provides an indepth and technical content provided by the best and brightest C++ experts of the C++ world.
Annual CppNow Conference - https://www.cppnow.org
https://www.linkedin.com/company/cppnow
https://twitter.com/cppnow
https://www.facebook.com/CppNow
https://www.reddit.com/r/CppNow
https://mastodon.social/@cppnow
Video Sponsors: think-cell and Bloomberg
Videos Filmed & Edited By Bash Films: https://bashfilms.com/
YouTube Channel Managed & Optimized By Digital Medium Ltd: https://events.digital-medium.co.uk
#reflection #boost #cpp #cplusplus #programming #coding #softwareengineering #softwaredeveloper #code #cplusplusprogramming #cplusplustutorial #cplus #softwaredevelopment Welcome to v1.0 of the meta::[[verse]]! - Inbal Levi - C++Now 2025](https://i.ytimg.com/vi/BKIuIh3Jo_s/mqdefault.jpg)
