CppCon 2016: Roland Bock “How to test static_assert?"
2,762 views · Published 5 October 2016 · 57:53 · Indexed 24 September 2026
Channel: CppCon · 2016 · Education
http://CppCon.org — Presentation Slides, PDFs, Source Code and other presenter materials are available at: https://github.com/cppcon/cppcon2016 — static_assert gives us the ability to assert conditions at compile time and provide custom error messages in case the conditions are not met. Cool! But how can you be sure that your precious static_asserts actually fire when you need them? There is only one way to know for sure: You need to test your static_assert! That is easier said than done, though, as static_assert produces a hard, unrecoverable compile-time error. For instance, you cannot test one static_assert with another. This talk will demonstrate several options for testing static_assert, ranging from the build system, over the compiler features to template meta programming. It will include real-life examples from sqlpp11. — Roland Bock PPRO Financial Ltd Principal Software Engineer Munich Area, Germany From my days at the university, I hold a PHD in physics (although that was in the previous century and seems like a different life by now). Ever since then I have been developing software and/or managing engineering teams. In 2008, I started to learn C++ because I could not believe that it was as difficult as some people claimed. Turns out they were totally wrong and totally right at the same time. Today, I am still learning and I hope to continue to do so for a very long time! I am the author of the libraries sqlpp11 and kiss-templates. Apart from C++ itself, I'd be particularly interested in talking about strategies for hiring C++ engineers. — Videos Filmed & Edited by Bash Films: http://www.BashFilms.com Work at Hudson River Trading (HRT): https://tinyurl.com/safxfctf
More from this channel
-
1:03:17
Elevate Your Code to Modern C++11 with Automated Tooling - Peter Sommerlad [ CppCon 2014 ]
-
50:09
CppCon 2015: Joel Falcou PART 3 “Expression Templates: Past, Present, Future”
-
51:27
Simple, Extensible Pattern Matching in C++14 - John R. Bandela [ CppCon 2015 ]
-
44:35
CppCon 2015: Jens Weller “An Overview on Encryption in C++"
-
8:41
Introducing brigand - Edouard Alligand & Joel Falcou [ CppCon 2015 ]
-
12:05
Traits Go Mainstream... Leor Zolman - [ CppCon 2015 ]
-
1:01:32
CppCon 2016: Bob Steagall “Lightweight Object Persistence With Relocatable Heaps in Modern C++"
-
1:08:27
CppCon 2017: Tomasz Kapela “C++ and Persistent Memory Technologies, Like Intel's 3D-XPoint”