Created on 2009-02-06.00:00:00 last changed 178 months ago
[Voted into WP at March, 2010 meeting.]
Proposed resolution (November, 2009):
Change 9.2.3 [dcl.fct.spec] paragraph 4 as follows:
...A static local variable in an extern inline function always refers to the same object. A string literal in the body of an extern inline function is the same object in different translation units. [Note: A string literal appearing in a default argument expression is not in the body of an inline function merely because the expression is used in a function call from that inline function. —end note] A type defined within the body of an extern inline function is the same type in every translation unit.
Notes from the July, 2009 meeting:
The types are intended to be the same.
9.2.3 [dcl.fct.spec] paragraph 4 specifies that local static variables and string literals appearing in the body of an inline function with external linkage must be the same entities in every translation unit in the program. Nothing is said, however, about whether local types are likewise required to be the same.
Although a conforming program could always have determined this by use of typeid, recent changes to C++ (allowing local types as template type arguments, lambda expression closure classes) make this question more pressing.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-03-29 00:00:00 | admin | set | messages: + msg2683 |
2010-03-29 00:00:00 | admin | set | status: tentatively ready -> cd2 |
2010-02-16 00:00:00 | admin | set | messages: + msg2498 |
2010-02-16 00:00:00 | admin | set | status: drafting -> tentatively ready |
2009-03-23 00:00:00 | admin | set | messages: + msg1949 |
2009-03-23 00:00:00 | admin | set | status: open -> drafting |
2009-02-06 00:00:00 | admin | create |