#2851 closed Bugs (fixed)
BOOST_FOREACH problem with Intel compiler
Reported by: | 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)
Change History (4)
by , 14 years ago
Attachment: | boost_bug.cpp added |
---|
comment:1 by , 14 years ago
Owner: | changed from | to
---|
comment:2 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [51752]) Intel-Win can't seem to handle const rvalues in the ternary conditional operator, fixes #2851