Loading…
CppCon 2018 has ended
Monday, September 24 • 14:00 - 15:00
How to Write Well-Behaved Value Wrappers

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

There are many useful generic types which wrap a number of values up into one object, e.g. std::optional or std::tuple. These types are conceptually very simple, but designing and implementing them to be as optimal and consistent as possible is deceptively difficult. This talk will outline key considerations, show why they matter by examining the assembly generated from compilers, and describe a number of solutions for problems which arise. Finally, a number of C++ standards papers which could ease the implementation burden for these types will be discussed.

Topics covered will include implicit/explicit constructors, conditional deletion of special member functions, propagation of special member triviality, noexcept correctness, private inheritance, and comparison operators.

Speakers
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 →


Monday September 24, 2018 14:00 - 15:00 PDT
Keystone (404)
  • Type Design