This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 114b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-05-06


1745. thread_local constexpr variable

Section: 9.2.6  [dcl.constexpr]     Status: NAD     Submitter: John Spicer     Date: 2013-09-05

Neither 9.2.6 [dcl.constexpr] nor 9.2.2 [dcl.stc] forbids combining the thread_local and constexpr specifiers in the declaration of a variable. Should this combination be permitted?

Rationale (January, 2014):

Such an object could have mutable subobjects. The constexpr specifier guarantees static initialization.