Boost logo

Boost :

Subject: Re: [boost] BOOST_FOREACH not compiling with Multindex containers, Intel Compiler version 11
From: Eric Niebler (eric_at_[hidden])
Date: 2008-11-17 12:18:09


lipik wrote:
> Hi,
>
> I use boost.Multindex in my code, to simulate std::map. The code works fine on
> VC++ 2003 and Intel Compiler 10, but after upgrading to ICL 11 (latest), I can't
> use BOOST_FOREACH macros like so:
> BOOST_FOREACH (const parameters_map::value_type &pv, params) {
> }
>
> The compiler throws up the following error:
>
> .\interaction_request_handler.cpp(192): error: operand types are incompatible
> ("boost::foreach_detail_::rvalue_probe<const parameters_map>" and "const
> parameters_map")
> BOOST_FOREACH (const parameters_map::value_type &pv, params) {

I don't have access to this compiler, so I can't work on this. Perhaps
someone with Intel 11 and time to spare can track it down and submit a
patch.

In the mean time, you can try turning off rvalue detection by defining
BOOST_FOREACH_NO_RVALUE_DETECTION. But then you can't use BOOST_FOREACH
on rvalue sequence expressions.

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

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