In the ongoing debate about the safety of C++, undefined behavior (UB), bounds checking, and memory leaks often dominate the conversation. While some argue that these pitfalls are inherent to the language’s power and flexibility, modern C++ standards have introduced mechanisms to mitigate these risks.
This talk explores how leveraging constexpr from its inception in C++11 through its evolution in C++26, can significantly enhance code safety. We’ll look at common safety issues in C++, explore tools and sanitizers that can help, and demonstrate how constexpr can be a powerful but often overlooked solution.
View Slides
Mikhail is a Principal Software Engineer at reMarkable, where he writes C++ for hardware that may or may not have an operating system.
At Library in a Week at C++Now 2025, he proposed beman.monadics: free-function monadic operations for any box-like type. This talk is what happened next.
His interests are libraries that should compose but don't, build systems that should be declarative but aren't, and compile-time computation that arguably goes further than it should. He has been writing C++ for over 15 years.