Attending this event?
View analytic
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 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

Senior Software Engineer, GPGPU Toolchains, Codeplay Software
Simon is a GPGPU toolchain developer at Codeplay Software in Edinburgh. He turns into a metaprogramming fiend every full moon, when he can be found bringing compilers to their knees with template errors and debating undefined behaviour on the C++ Slack channel. He co-organises the... Read More →

Tuesday September 25, 2018 15:15 - 15:45

Attendees (50)