Boost C++ Libraries: Ticket #2851: BOOST_FOREACH problem with Intel compiler https://svn.boost.org/trac10/ticket/2851 <p> Hello, </p> <p> 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: </p> <ul><li>change line 53 of foreach.hpp from BOOST_WORKAROUND(BOOST_INTEL_WIN, &lt;= 810) to BOOST_WORKAROUND(BOOST_INTEL_WIN, &lt;= 1400) </li></ul><ul><li>make in the example file the vector "<a class="missing wiki">ItemContainer</a> mCollection" a pointer: "<a class="missing wiki">ItemContainer</a> *mCollection;" and adress the object itself in the BOOST_FOREACH-macro </li></ul><p> Obviously, a workaround is no fix; so here the compiler output: </p> <p> Compiler output: 1&gt;Compiling with Intel(R) C++ 11.0.072 [IA-32]... (Intel C++ Environment) 1&gt;boost_bug.cpp 1&gt;.\boost_bug.cpp(21): error: operand types are incompatible ("boost::foreach_detail_::rvalue_probe&lt;const TestClass::<a class="missing wiki">ItemContainer</a>&gt;" and "const TestClass::<a class="missing wiki">ItemContainer</a>") 1&gt; BOOST_FOREACH (Item* n, mCollection) 1&gt; <sup> </sup></p> <p> Please let me know if you can re-create the problem and if you can fix it. </p> <p> Sincerely, Stefan Göhler </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2851 Trac 1.4.3 anonymous Thu, 12 Mar 2009 16:48:14 GMT attachment set https://svn.boost.org/trac10/ticket/2851 https://svn.boost.org/trac10/ticket/2851 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_bug.cpp</span> </li> </ul> Ticket Steven Watanabe Fri, 13 Mar 2009 16:31:46 GMT owner changed https://svn.boost.org/trac10/ticket/2851#comment:1 https://svn.boost.org/trac10/ticket/2851#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Stefan Seefeld</span> to <span class="trac-author">Eric Niebler</span> </li> </ul> Ticket Eric Niebler Fri, 13 Mar 2009 16:54:47 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2851#comment:2 https://svn.boost.org/trac10/ticket/2851#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/51752" title="Intel-Win can't seem to handle const rvalues in the ternary ...">[51752]</a>) Intel-Win can't seem to handle const rvalues in the ternary conditional operator, fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2851" title="#2851: Bugs: BOOST_FOREACH problem with Intel compiler (closed: fixed)">#2851</a> </p> Ticket Eric Niebler Fri, 13 Mar 2009 16:56:27 GMT <link>https://svn.boost.org/trac10/ticket/2851#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2851#comment:3</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/51753" title="Intel-Win can't seem to handle const rvalues in the ternary ...">[51753]</a>) Intel-Win can't seem to handle const rvalues in the ternary conditional operator, fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2851" title="#2851: Bugs: BOOST_FOREACH problem with Intel compiler (closed: fixed)">#2851</a> </p> </description> <category>Ticket</category> </item> </channel> </rss>