Unlisted Videos All Videos All Videos Submit Video



Embracing User Defined Literals Safely for Types that Behave as though Built-in - Pablo Halpern








Uploaded to YouTube by: CppCon
Date submitted to Unlisted Videos: 20 February 2024
Date uploaded/published to YouTube: 25 December 2021

Tags:




Description:

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
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.

---
Pablo Halpern

Pablo Halpern has been programming in C++ since 1989 and has been a member of the C++ Standards Committee since 2007. His major contributions to the standard have been in the areas of parallel and vector programming constructs as well as on improvements to the usability of memory allocators. Pablo is a major contributor to the upcoming book, Embracing Modern C++ Safely by John Lakos and Vittorio Romeo (2021) and is the author of The C++ Standard Library from Scratch (2000). His current development focus is in moving the API of the open-source BDE library in the direction of the C++17 PMR allocator model. He lives with his partner in Boston, MA. When not working on books and allocators, he enjoys model rocketry, hiking, skiing, snowboarding, and watching opera.

---
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

Register Now For CppCon 2022: https://cppcon.org/registration/