Boost C++ Libraries: Ticket #8187: Bug in phoenix docs and example code https://svn.boost.org/trac10/ticket/8187 <p> The example <a href="http://www.boost.org/libs/phoenix/doc/html/phoenix/examples/transforming_the_expression_tree.html">here</a> is leading people astray. It is not recursively applying the transformation for node types other than plus, minus, multiplies and divides. If the top-most node is not one of those, no transformation happens. </p> <p> The default case shown is: </p> <pre class="wiki">struct invert_actions { template &lt;typename Rule&gt; struct when : proto::_ // the default is proto::_ {}; }; </pre><p> I think it should be: </p> <pre class="wiki">struct invert_actions { template &lt;typename Rule&gt; struct when : proto::nary_expr&lt; proto::_, proto::vararg&lt; proto::when&lt;proto::_, evaluator(proto::_, _context)&gt; &gt; &gt; {}; }; </pre><p> I'm actually not quite sure how this works, but it seems to. Note that the problem would also need to be fixed <a href="http://www.boost.org/libs/phoenix/example/invert.cpp">here</a>. </p> <p> See <a class="ext-link" href="http://stackoverflow.com/questions/15077637/transforming-a-boost-c-phoenix-expression-tree"><span class="icon">​</span>http://stackoverflow.com/questions/15077637/transforming-a-boost-c-phoenix-expression-tree</a> for a discussion. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8187 Trac 1.4.3 Kohei Takahashi Sat, 24 Jun 2017 07:34:23 GMT owner, milestone changed https://svn.boost.org/trac10/ticket/8187#comment:1 https://svn.boost.org/trac10/ticket/8187#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Thomas Heller</span> to <span class="trac-author">Kohei Takahashi</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.65.0</span> </li> </ul> <p> Yes, you are right. </p> Ticket Kohei Takahashi Wed, 28 Jun 2017 14:11:07 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/8187#comment:2 https://svn.boost.org/trac10/ticket/8187#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> Fixed <a class="ext-link" href="https://github.com/boostorg/phoenix/pull/56"><span class="icon">​</span>https://github.com/boostorg/phoenix/pull/56</a> </p> Ticket Kohei Takahashi Sun, 11 Mar 2018 06:57:44 GMT milestone changed https://svn.boost.org/trac10/ticket/8187#comment:3 https://svn.boost.org/trac10/ticket/8187#comment:3 <ul> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.65.0</span> → <span class="trac-field-new">Boost 1.67.0</span> </li> </ul> Ticket