
1 Nov
2005
1 Nov
'05
5:10 p.m.
Sascha Seewald wrote:
Hi Boosters!
I've been playing around with BOOST_FOREACH a little and got some unexpected results. The following program crashes when I try to iterate a const map with BOOST_FOREACH. That's really strange because for the non-const map everything works fine.
Please take a look at the source. What's wrong here? Did I miss something?
You haven't missed anything, and what's wrong here is your compiler, sadly. No version of MSVC is compliant enough to detect const-qualified rvalues. My only advice to you is: don't do that. -- Eric Niebler Boost Consulting www.boost-consulting.com