CppCon 2021 has ended
Back To Schedule
Tuesday, October 26 • 9:00am - 10:00am
Embracing User Defined Literals Safely for Types that Behave as though Built-in

Log in to save this to your schedule, view media, leave feedback and see who's attending!

Feedback form is now closed.
A fundamental design goal of C++ is to minimize the expressive differences between built-in types and user-defined types (UDTs). Just as we can overload `operator+` for our UDT, we can also specify a syntax for creating a value of that type; think `123_bigint` or `"[a-z]*"_regexp`. But just because we *can* overload an operator or create a user-defined literal (UDL), doesn't mean that we *should* do so. In this talk, we will cover the benefits of UDLS, several ways of defining them (each more powerful and complex than the one before), some best practices, and -- most importantly -- the pitfalls of defining one's own UDLs and when *not* to.

ALL TALK SESSIONS CAN BE ACCESSED FROM THE MAIN LOBBY: https://cppcon.digital-medium.co.uk/

avatar for Pablo Halpern

Pablo Halpern

President, Halpern-Wight, Inc.
Pablo Halpern is a freelance software developer and consultant. He has been programming in C++ since 1989 and has been a member of the C++ Standards Committee since 2007. His main contributions to the C++ Standard has been in the area of parallel and vector programming, and he is... Read More →

Tuesday October 26, 2021 9:00am - 10:00am MDT