Created on 2012-04-26.00:00:00 last changed 147 months ago
Rationale (October, 2012):
This is a duplicate of issue 900.
Because the reference __range in the expansion of a range-based for statement, as described in 8.6.5 [stmt.ranged] paragraph 1, is bound only to the top-level expression of range-init, the lifetime of temporaries created at lower levels in that expression expires before the body of the loop is reached, leading to dangling references. It would be helpful if the lifetime of those temporaries were extended over the entire statement.
(See also issue 1523 for another question regarding the rewritten form of the range-based for.)
History | |||
---|---|---|---|
Date | User | Action | Args |
2012-11-03 00:00:00 | admin | set | messages: + msg4185 |
2012-11-03 00:00:00 | admin | set | status: open -> dup |
2012-04-26 00:00:00 | admin | create |