This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 116a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-12-19
[Moved to DR at the May, 2015 meeting.]
According to 6.7.6.4 [basic.stc.auto] paragraph 3,
If a variable with automatic storage duration has initialization or a destructor with side effects, it shall not be destroyed before the end of its block, nor shall it be eliminated as an optimization even if it appears to be unused, except that a class object or its copy/move may be eliminated as specified in 11.4.5.3 [class.copy.ctor].
This is intended to be a requirement for the implementation, but it could be read as prohibiting the reuse of the storage of an automatic variable by the program using a placement new-expression.
Proposed resolution (November, 2014):
Change 6.7.6.4 [basic.stc.auto] paragraph 3 as follows:
If a variable with automatic storage duration has initialization or a destructor with side effects,itan implementation shall notbe destroyeddestroy it before the end of its block,norshall it be eliminatedeliminate it as an optimization, even if it appears to be unused, except that a class object or its copy/move may be eliminated as specified in 11.4.5.3 [class.copy.ctor].