Loading…
This event has ended. View the official site or create your own event → Check it out
This event has ended. Create your own
View analytic
Thursday, September 22 • 3:15pm - 4:15pm
How to test static_assert?

Log in to save this to your schedule and see who's attending!

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.

Speakers
avatar for Roland Bock

Roland Bock

Principal Software Engineer, PPRO Financial Ltd
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... Read More →


Thursday September 22, 2016 3:15pm - 4:15pm
Frey (Room 406) Meydenbauer Center