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 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.

avatar for Simon Brand

Simon Brand

C++ Developer Advocate, Microsoft
Simon is a C++ Developer Advocate at Microsoft. 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 online. He co-organises the Edinburgh C++ user group and contributes... Read More →

Monday September 24, 2018 14:00 - 15:00
Keystone (404)

Attendees (135)