Overview
Explore the concept of constant expressions in C++ through this comprehensive conference talk from ACCU 2016. Delve into the world of constexpr with Dietmar Kühl, a senior software developer at Bloomberg L.P. and regular attendee of the ANSI/ISO C++ standards committee. Learn about the importance and applications of constant expressions, comparing bitmasks to constexpr, and understanding constexpr functions and literal types. Discover the implications of names in constexpr, explore practical examples, and gain insights into constexpr factory maps. Examine the performance differences between gcc and clang compilers when working with constant expressions. Enhance your C++ programming skills and optimize your code with the power of compile-time computations.
Syllabus
Intro
Overview
Constant Expressions
Why constexprs? III
Bitmask vs. constexpr
constexpr Functions
Literal Types
Names in constexpr
Name Example
Name Implication
Objective
Detour; string_view
match 1st()
Attempt: Use an Array
Validity of constexpr Fun
constexpr Map Members
Deducing Type
Sorting Elements
Constexpr Factory Map
Times gcc
Times clang
Taught by
ACCU Conference