Boost C++ Libraries: Ticket #7165: cannot change BOOST_PHOENIX_LIMIT https://svn.boost.org/trac10/ticket/7165 <p> Hi ! </p> <p> The following code : </p> <blockquote> <p> #define BOOST_PHOENIX_LIMIT 20 #include &lt;boost/phoenix.hpp&gt; </p> </blockquote> <p> fails to compile with boost 1.50 and msvc 2010 with an error trace starting with : </p> <blockquote> <p> 1&gt;C:\dev\include\boost/phoenix/core/preprocessed/actor_30.hpp(10): error C2977: 'boost::proto::and_' : too many template arguments 1&gt; C:\dev\include\boost/proto/matches.hpp(784) : see declaration of 'boost::proto::and_' </p> </blockquote> <p> The following compiles : </p> <blockquote> <p> #define BOOST_PHOENIX_LIMIT 20 #define BOOST_PROTO_MAX_LOGICAL_ARITY 20 #include &lt;boost/phoenix.hpp&gt; </p> </blockquote> <p> In <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> Eric Niebler seems to suggest that proto::and_ should be split and nested to avoid having to change BOOST_PROTO_MAX_LOGICAL_ARITY, wouldn't that solve the issue ? </p> <p> Thanks, MAT. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7165 Trac 1.4.3 m.champlon@… Tue, 24 Jul 2012 13:01:26 GMT <link>https://svn.boost.org/trac10/ticket/7165#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7165#comment:1</guid> <description> <p> It looks like a fix for this issue would be in limits.hpp to change : </p> <pre class="wiki">#if defined(BOOST_PHOENIX_LIMIT) #define BOOST_PROTO_MAX_ARITY BOOST_PHOENIX_LIMIT </pre><p> into : </p> <pre class="wiki">#if defined(BOOST_PHOENIX_LIMIT) #define BOOST_PROTO_MAX_ARITY BOOST_PHOENIX_PP_ROUND_UP(BOOST_PHOENIX_LIMIT) </pre> </description> <category>Ticket</category> </item> <item> <author>m.champlon@…</author> <pubDate>Mon, 30 Jul 2012 09:21:21 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7165#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7165#comment:2</guid> <description> <p> A bit of follow-up, </p> <p> The following code fails : </p> <pre class="wiki">#define BOOST_PHOENIX_LIMIT 20 #define BOOST_PROTO_MAX_LOGICAL_ARITY BOOST_PHOENIX_LIMIT #include &lt;boost/phoenix/core/argument.hpp&gt; void f() { boost::phoenix::arg_names::arg11; } </pre><p> with : </p> <pre class="wiki">error C2039: 'arg11' : is not a member of 'boost::phoenix::arg_names' </pre><p> Adding this to the top : </p> <pre class="wiki">#define BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES </pre><p> yields : </p> <pre class="wiki">...phoenix/core/environment.hpp(412): warning C4005: 'BOOST_PHOENIX_M0' : macro redefinition ...phoenix/support/detail/iterate_define.hpp(108) : see previous definition of 'BOOST_PHOENIX_M0' </pre><p> I hope this helps, tell me if there is anything I can do to help fix all this. </p> <p> Thanks ! <br /> MAT. </p> </description> <category>Ticket</category> </item> <item> <author>Mathieu Champlon <m.champlon@…></author> <pubDate>Fri, 26 Apr 2013 19:47:59 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/7165 https://svn.boost.org/trac10/ticket/7165 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_phoenix_7165.patch</span> </li> </ul> Ticket Mathieu Champlon <m.champlon@…> Fri, 26 Apr 2013 19:53:25 GMT <link>https://svn.boost.org/trac10/ticket/7165#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7165#comment:3</guid> <description> <p> I finally managed to write a test case and a fix for this, see boost_phoenix_7165.patch </p> <p> The patch initially contained the regenerated preprocessed actor.hpp files but the server refused to upload it because it's over the size limit (it's 566 KB !). I still have it and can email it directly to you if you want. </p> <p> The idea of the fix is to replace </p> <pre class="wiki">boost::proto::and_&lt; something, something, something, ... &gt; </pre><p> with </p> <pre class="wiki">boost::proto::and_&lt; something, boost::proto::and_&lt; something, boost::proto::and_&lt; something, ... &gt; &gt; &gt; </pre><p> Cheers, MAT. </p> </description> <category>Ticket</category> </item> <item> <author>John Fletcher <J.P.Fletcher@…></author> <pubDate>Sun, 02 Feb 2014 16:21:58 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7165#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7165#comment:4</guid> <description> <p> This patch and test have now been released on develop for testing. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Kohei Takahashi</dc:creator> <pubDate>Tue, 10 May 2016 13:53:39 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7165#comment:5 https://svn.boost.org/trac10/ticket/7165#comment:5 <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