Boost C++ Libraries: Ticket #7166: Phoenix unconditionally sets BOOST_PROTO_MAX_ARITY https://svn.boost.org/trac10/ticket/7166 <p> Hi, </p> <p> The following : </p> <pre class="wiki">#define BOOST_PROTO_MAX_ARITY 20 #include &lt;boost/phoenix.hpp&gt; </pre><p> exhibits the following warning with msvc 2010 and boost 1.50 : </p> <pre class="wiki">1&gt;C:\dev\include\boost/phoenix/core/limits.hpp(19): warning C4005: 'BOOST_PROTO_MAX_ARITY' : macro redefinition </pre><p> This is rather inconvenient for the user of several libraries. I suggest to modify limits.hpp to change : </p> <pre class="wiki">#if defined(BOOST_PHOENIX_LIMIT) #define BOOST_PROTO_MAX_ARITY BOOST_PHOENIX_LIMIT </pre><p> to : </p> <pre class="wiki"> #if defined(BOOST_PHOENIX_LIMIT) # if !defined( BOOST_PROTO_MAX_ARITY ) # define BOOST_PROTO_MAX_ARITY BOOST_PHOENIX_LIMIT # elif (BOOST_PROTO_MAX_ARITY &lt; BOOST_PHOENIX_LIMIT) # error "BOOST_PROTO_MAX_ARITY is set too low" # endif </pre><p> or see the attached patch. </p> <p> Thanks, MAT. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7166 Trac 1.4.3 m.champlon@… Tue, 24 Jul 2012 12:42:59 GMT attachment set https://svn.boost.org/trac10/ticket/7166 https://svn.boost.org/trac10/ticket/7166 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_phoenix_limits.hpp.patch</span> </li> </ul> Ticket Mathieu Champlon <m.champlon@…> Fri, 26 Apr 2013 19:57:04 GMT <link>https://svn.boost.org/trac10/ticket/7166#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7166#comment:1</guid> <description> <p> I added a test case to verify that the following code fails to compile </p> <pre class="wiki">#define BOOST_PROTO_MAX_ARITY 10 #define BOOST_PHOENIX_LIMIT 20 #include &lt;boost/phoenix.hpp&gt; </pre><p> because in case BOOST_PROTO_MAX_ARITY has been previously defined (for instance by including another boost library) there isn't much that can be done but #error'ing to the user. </p> <p> boost_phoenix_7166.patch includes both the test case and the fix already included in the previous patch. </p> <p> Cheers, </p> <p> MAT. </p> </description> <category>Ticket</category> </item> <item> <author>Mathieu Champlon <m.champlon@…></author> <pubDate>Fri, 26 Apr 2013 19:57:24 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/7166 https://svn.boost.org/trac10/ticket/7166 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_phoenix_7166.patch</span> </li> </ul> Ticket Mathieu Champlon <m.champlon@…> Fri, 26 Apr 2013 20:25:17 GMT <link>https://svn.boost.org/trac10/ticket/7166#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7166#comment:2</guid> <description> <p> I forgot to mention that this solution was also suggested in this thread : <a class="ext-link" href="http://boost.2283326.n4.nabble.com/phoenix-not-playing-nice-with-other-libs-td3489758.html"><span class="icon">​</span>http://boost.2283326.n4.nabble.com/phoenix-not-playing-nice-with-other-libs-td3489758.html</a> </p> </description> <category>Ticket</category> </item> <item> <author>John Fletcher <J.P.Fletcher@…></author> <pubDate>Sun, 02 Feb 2014 16:20:54 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7166#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7166#comment:3</guid> <description> <p> This patch and test are now released on develop for testing. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Kohei Takahashi</dc:creator> <pubDate>Tue, 10 May 2016 13:55:32 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7166#comment:4 https://svn.boost.org/trac10/ticket/7166#comment:4 <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> Ticket