Applied `constexpr`: Doing More Work At Compile Time [2019 Class Archive]

“Applied `constexpr`: Doing More Work At Compile Time” is a one-day training course with programming exercises taught by Jason Turner. It is offered at the Gaylord Rockies from 9AM to 5PM on Saturday, September 21st, 2019 (immediately following the conference). Lunch is included.

Course Description

By now we all know now that `constexpr` can be used to generate virtually anything at compile time. But what does this mean for our normal day to day C++ work? How, why, and most importantly where do we use `constexpr` to get the most out of it in our quest for clean efficient C++?

Prerequisites

A working knowledge of C++ and the desire to do more work at compile time and less at run time.

Course Topics

 

Introduction
  • History and background of C++
  • Changes from C++11 to C++14
  • Changes from C++14 to C++17
  • Limitations of `constexpr`
  • Exercises for demonstrating what can or cannot be `constexpr`
Preparing for `constexpr`
  • Developing a `constexpr` mindset
  • General advantages to types that fully support `constexpr`
  • Disadvantages to `constexpr`
Using `constexpr`
  • What is actually required to be executed at compile time?
  • Compile-time data verification
  • Creating compile-time resources
  • Utilizing compile-time resources
  • Compile-time sorting
  • Compile-time testing
Conclusion
  • Maintaining `constexpr` support
  • Current compiler support status
  • The future of `constexpr` for C++20

Course Instructor

Jason_Turner

Jason Turner is a regular speaker at C++ conferences, the creator of the “Learning C++ Best Practices” video series from O’Reilly and the http://cppbestpractices.com online C++ coding standards document. As a contractor, speaker and trainer he has specialized in helping others produce high quality C++ code. Jason is also the co-host of the C++ podcast, CppCast, and the host of the YouTube video series, C++ Weekly.