Uploaded September 2026 | Updated December 2026, 3 hours ago
https://www.cppnow.org
---
Testing Everything in Constexpr - Braden Ganetsky - C++Now 2026
---
It is common knowledge that good software design practices involve unit testing your code. With more and more C++ code being executed at compile-time, it's necessary that we also write unit tests that check the validity at compile-time. However, this is no trivial matter. Just like with regular run-time code, we cannot reasonably claim that the code works in all its intended purposes unless it is tested and empirically shown to work. In very rare cases, a compiler's output can even vary between compile-time and run-time, given identical source code.
This talk will build up a compile-time-centric unit testing library, taking the audience on a tour of how and why to write compile-time unit tests. The "why" is straightforward and very important; as software professionals, we must test the validity of our code. The "how" is the fun part. Triggering a conditional miscompile is easy, but we all know that C++ compiler output can get notoriously unruly upon hitting errors. Therefore, we will explores ways to attain as much readability as possible in our diagnostics and error messages.
Currently, there are no popular C++ unit testing libraries that treat compile-time testing as a first-rate capability. As more and more code is written at compile-time, and as we move towards C++26 reflection, we still need to be testing all of our code. Let's explore the tools we need in order to ergonomically and scalably test our constexpr code.
---
Slides: https://ganets.ky/slides/2026/cppnow
think-cell develops one of the world’s leading PowerPoint applications, with C++ at the core of everything we build, from layout algorithms to deep integration with Microsoft Office. Interested in working on challenging C++ problems with real-world impact? Explore our open roles: think-cell.com/en/career/tech
---
Braden Ganetsky
Braden Ganetsky serves as the Secretary of WG21, the ISO C++ committee. Braden graduated from the University of Manitoba with a degree in mechanical engineering, fueled by his passion for mechanical puzzles. During his final year of school, when all classes and activities were remote, he discovered C++ and has been hooked ever since. He interned as a C++ developer, which turned into a full time job, completing a successful pivot of his career. Now he spend his nights working on fun projects like parser combinators, constexpr unit testing, and getting involved in the C++ community.
---
C++Now is an annual onsite international C++ programming and coding conference held in Aspen, Colarado. For all C++ developers, C++ software engineers and those involved with the C++ language, CppNow provides an indepth and technical content provided by the best and brightest C++ experts of the C++ world.
Annual CppNow Conference - cppnow.org
linkedin.com/company/cppnow
twitter.com/cppnow
facebook.com/CppNow
reddit.com/r/CppNow
https://mastodon.social/@cppnow
Video Sponsors: Bloomberg
---
Videos Filmed & Edited By Bash Films: bashfilms.com
YouTube Channel Managed & Optimized By Digital Medium Ltd: events.digital-medium.co.uk
---
#boost #cpp #cplusplus #programming #coding #softwareengineering #softwaredeveloper #code #cplusplusprogramming #cplusplustutorial #cplus #softwaredevelopment #coder #talk
https://www.cppnow.org
---
Testing Everything in Constexpr - Braden Ganetsky - C++Now 2026
---
It is common knowledge that good software design practices involve unit testing your code. With more and more C++ code being executed at compile-time, it's necessary that we also write unit tests that check the validity at compile-time. However, this is no trivial matter. Just like with regular run-time code, we cannot reasonably claim that the code works in all its intended purposes unless it is tested and empirically shown to work. In very rare cases, a compiler's output can even vary between compile-time and run-time, given identical source code.
This talk will build up a compile-time-centric unit testing library, taking the audience on a tour of how and why to write compile-time unit tests. The "why" is straightforward and very important; as software professionals, we must test the validity of our code. The "how" is the fun part. Triggering a conditional miscompile is easy, but we all know that C++ compiler output can get notoriously unruly upon hitting errors. Therefore, we will explores ways to attain as much readability as possible in our diagnostics and error messages.
Currently, there are no popular C++ unit testing libraries that treat compile-time testing as a first-rate capability. As more and more code is written at compile-time, and as we move towards C++26 reflection, we still need to be testing all of our code. Let's explore the tools we need in order to ergonomically and scalably test our constexpr code.
---
Slides: https://ganets.ky/slides/2026/cppnow
think-cell develops one of the world’s leading PowerPoint applications, with C++ at the core of everything we build, from layout algorithms to deep integration with Microsoft Office. Interested in working on challenging C++ problems with real-world impact? Explore our open roles: think-cell.com/en/career/tech
---
Braden Ganetsky
Braden Ganetsky serves as the Secretary of WG21, the ISO C++ committee. Braden graduated from the University of Manitoba with a degree in mechanical engineering, fueled by his passion for mechanical puzzles. During his final year of school, when all classes and activities were remote, he discovered C++ and has been hooked ever since. He interned as a C++ developer, which turned into a full time job, completing a successful pivot of his career. Now he spend his nights working on fun projects like parser combinators, constexpr unit testing, and getting involved in the C++ community.
---
C++Now is an annual onsite international C++ programming and coding conference held in Aspen, Colarado. For all C++ developers, C++ software engineers and those involved with the C++ language, CppNow provides an indepth and technical content provided by the best and brightest C++ experts of the C++ world.
Annual CppNow Conference - cppnow.org
linkedin.com/company/cppnow
twitter.com/cppnow
facebook.com/CppNow
reddit.com/r/CppNow
https://mastodon.social/@cppnow
Video Sponsors: Bloomberg
---
Videos Filmed & Edited By Bash Films: bashfilms.com
YouTube Channel Managed & Optimized By Digital Medium Ltd: events.digital-medium.co.uk
---
#boost #cpp #cplusplus #programming #coding #softwareengineering #softwaredeveloper #code #cplusplusprogramming #cplusplustutorial #cplus #softwaredevelopment #coder #talk










