constexpr (C++11)
Generalized constant expressions: constexpr functions, constructors and variables, plus constexpr in the library.
Connected features
Papers
8 · Toronto 2007 → Madrid 2011Adds constexpr functions, constructors and variables, generalizing constant expressions. J16 16-6-2, WG21 4-0-1.
Marks the first set of library functions and constructors as constexpr. With modifications per Steve Adamczyk and Mike Miller, and without the changes to bitset types (need more work).
Second round of constexpr in the library after the concepts removal. Library motion 3.
Allows constexpr functions to take reference parameters.
Clarifies what a 'potential constant expression' is (core issue 1125).
Consolidated corrections to the constexpr rules before the FDIS. Minutes: issues 1060, 1100, 1197.
Allows static_assert and list-initialization inside constexpr functions. Minutes: issues 837, 898.
Specifies how references interact with constant expressions (core issues 1194/1195/1199).