
24 Jun
2012
24 Jun
'12
12:46 p.m.
On Sat, Jun 23, 2012 at 10:22 PM, Jeffrey Lee Hellrung, Jr. <jeffrey.hellrung@gmail.com> wrote:
On Sat, Jun 23, 2012 at 2:13 AM, Nathan Ridge <zeratul976@hotmail.com>wrote:
By the way, my first thought when I encountered this problem is that C++11 ought to have specified the range-based for loop in such a way that the lifetime of temporaries in the range expression is extended for the duration of the loop.
Sounds like the simplest and most generic solution. Does BOOST_FOREACH suffer from the same problem? Olaf