Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2005-11-01 12:10:52


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

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk