Boost C++ Libraries: Ticket #8134: Compiler error using boost::foreach with boost::bimap https://svn.boost.org/trac10/ticket/8134 <p> boost_1_52_0\boost\multi_index\ordered_index.hpp(1399) : error C3083: 'BOOST_FOREACH': the symbol to the left of a '::' must be a type boost_1_52_0\boost\multi_index\ordered_index.hpp(1399) : error C2039: 'tag' : is not a member of 'boost' boost_1_52_0\boost\multi_index\ordered_index.hpp(1399) : error C2061: syntax error : identifier 'tag' </p> <p> This occurs when using boost::bimap and boost::foreach. Seen first in 1.52, also in 1.53. OK in 1.49, with Visual tudio 2008 and 2010 </p> <p> Very simple VS2008 project included. Need to set environment variable BOOST_DIR to the boost directory, or change the project settings explicitly. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8134 Trac 1.4.3 john.x.foster@… Thu, 21 Feb 2013 05:40:56 GMT attachment set https://svn.boost.org/trac10/ticket/8134 https://svn.boost.org/trac10/ticket/8134 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">BugTest.7z</span> </li> </ul> <p> Visual Studio 2008 project file and three very short source files. </p> Ticket Tom Stoffer <tom@…> Mon, 25 Mar 2013 20:53:43 GMT <link>https://svn.boost.org/trac10/ticket/8134#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8134#comment:1</guid> <description> <p> Any progress on this? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Mon, 25 Mar 2013 21:23:32 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8134#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8134#comment:2</guid> <description> <p> don't #define foreach. This is a classic example of why macros are evil. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Mon, 25 Mar 2013 23:30:35 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8134#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8134#comment:3</guid> <description> <p> I agree, macros are evil, but... </p> <p> ... see the section in boost::foreach doco: </p> <p> Making BOOST_FOREACH Prettier </p> <p> There is no clash in my code - if boost documentation makes such recommendations then there should be no clash within the boost libraries, or there should be a disclaimer. </p> </description> <category>Ticket</category> </item> </channel> </rss>