Constexpr, Traits, and Static Assertions in C++

Purchase a Subscription!

Watch the first few minutes on us! If you'd like to watch the entire video and hundreds more like it, download code samples, access offline videos and skills assessments, and use the discussion forums, log in or purchase a subscription.


Julian Templeman


Templates are a compile-time mechanism, and three recent additions to the language and library have made templates more useful than ever before. Learn about constexpr, which greatly enhances what the compiler can calculate at compile time; type traits, which make template code more robust; and static_assert, which supports compile-time assertions.

Table of Contents

{{toc.Position}} {{toc.Text}}

Related Links

  • {{link.LinkText}} (requires a paid subscription)


This course is part of the following series: