Created on 2009-03-03.00:00:00 last changed 179 months ago
[Voted into WP at March, 2010 meeting.]
Proposed resolution (October, 2009):
Change 9.2.2 [dcl.stc] paragraph 4 as follows:
The thread_local specifier indicates that the named entity has thread storage duration (6.7.6.3 [basic.stc.thread]). It shall be applied only to the names of objects or references of namespacescope, to the names of objects or references ofor block scopethat also specify extern or static,and to the names of static data members.It specifies that the named object or reference has thread storage duration (6.7.6.3 [basic.stc.thread]).When thread_local is applied to a variable of block scope the storage-class-specifier static is implied if it does not appear explicitly.
Notes from the July, 2009 meeting:
The consensus of the CWG was that thread_local should imply static, as suggested, but that the combination should still be allowed (it is needed, for example, for thread-local static data members).
According to 9.2.2 [dcl.stc] paragraph 4,
The thread_local specifier shall be applied only to the names of objects or references of namespace scope and to the names of objects or references of block scope that also specify static.
Why require two keywords, where one on its own becomes ill-formed? thread_local should imply static in this case, and the combination of keywords should be banned rather than required. This would also eliminate the one of two exceptions documented in paragraph 1.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-03-29 00:00:00 | admin | set | messages: + msg2682 |
2010-03-29 00:00:00 | admin | set | status: ready -> cd2 |
2009-11-08 00:00:00 | admin | set | messages: + msg2346 |
2009-11-08 00:00:00 | admin | set | status: drafting -> ready |
2009-08-03 00:00:00 | admin | set | messages: + msg2192 |
2009-08-03 00:00:00 | admin | set | status: open -> drafting |
2009-03-03 00:00:00 | admin | create |