Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#2851 closed Bugs (fixed)

BOOST_FOREACH problem with Intel compiler

Reported by: s.goehler@… Owned by: Eric Niebler
Milestone: Boost 1.39.0 Component: foreach
Version: Boost 1.38.0 Severity: Regression
Keywords: Cc:

Description

Hello,

when compiling one of our applications with the Intel Compiler 11.0.072, I experienced a problem with local non-pointer variables. There are actually two workarounds to this:

  • change line 53 of foreach.hpp from BOOST_WORKAROUND(BOOST_INTEL_WIN, <= 810) to BOOST_WORKAROUND(BOOST_INTEL_WIN, <= 1400)
  • make in the example file the vector "ItemContainer mCollection" a pointer: "ItemContainer *mCollection;" and adress the object itself in the BOOST_FOREACH-macro

Obviously, a workaround is no fix; so here the compiler output:

Compiler output: 1>Compiling with Intel(R) C++ 11.0.072 [IA-32]... (Intel C++ Environment) 1>boost_bug.cpp 1>.\boost_bug.cpp(21): error: operand types are incompatible ("boost::foreach_detail_::rvalue_probe<const TestClass::ItemContainer>" and "const TestClass::ItemContainer") 1> BOOST_FOREACH (Item* n, mCollection) 1>

Please let me know if you can re-create the problem and if you can fix it.

Sincerely, Stefan Göhler

Attachments (1)

boost_bug.cpp (552 bytes ) - added by anonymous 14 years ago.

Download all attachments as: .zip

Change History (4)

by anonymous, 14 years ago

Attachment: boost_bug.cpp added

comment:1 by Steven Watanabe, 14 years ago

Owner: changed from Stefan Seefeld to Eric Niebler

comment:2 by Eric Niebler, 14 years ago

Resolution: fixed
Status: newclosed

(In [51752]) Intel-Win can't seem to handle const rvalues in the ternary conditional operator, fixes #2851

comment:3 by Eric Niebler, 14 years ago

(In [51753]) Intel-Win can't seem to handle const rvalues in the ternary conditional operator, fixes #2851

Note: See TracTickets for help on using tickets.