CppCon 2018 has ended
Back To Schedule
Tuesday, September 25 • 15:15 - 15:45
Overloading: The Bane of All Higher-Order Functions

Sign up or log in to save this to your schedule, view media, leave feedback and see who's attending!

Support for functional programming has been consistently growing in C++. Lambdas, new algorithms, variant visitation and std::apply are just a few of the many additions which make use of the paradigm more natural, expressive and powerful. Unfortunately, passing overloaded functions or function templates to higher-order functions is not as simple as it sounds, which forces users to adopt various unsatisfactory workarounds. This talk will discuss a few solutions, show how C++ still has a way to go in providing language support, and examine some existing standards proposals which could help.

Techniques discussed will include wrapping up overload sets in lambdas; maintaining noexcept specifications, return types, and brevity; global function objects; and avoiding subtle One Definition Rule (ODR) violations.

avatar for Simon Brand

Simon Brand

C++ Developer Advocate, Microsoft
Simon is Microsoft’s C++ Developer Advocate. Their background is in compilers and debuggers for embedded accelerators, but they’re also interested in generic library design, metaprogramming, functional-style C++, undefined behaviour, and making our communities more welcoming and... Read More →

Tuesday September 25, 2018 15:15 - 15:45 PDT
Copper Mountain Theater (2nd Floor)
  • Interface Design