Boost C++ Libraries: Ticket #5824: Block statement docs do not mention necessary header file https://svn.boost.org/trac10/ticket/5824 <p> In the documentation for block statements <a class="changeset" href="https://svn.boost.org/trac10/changeset/1" title="Import core sources for SVNmanger 0.38 ">[1]</a>, there is no mention of the needed header file (scope.hpp, I think?). This is particularly insidious because block statements will compile without this header, but they will silently generate the wrong runtime code (only the last statement in the comma-chain will be executed). </p> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/1" title="Import core sources for SVNmanger 0.38 ">[1]</a> <a href="http://www.boost.org/doc/libs/1_47_0/libs/phoenix/doc/html/phoenix/modules/statement/block_statement.html">http://www.boost.org/doc/libs/1_47_0/libs/phoenix/doc/html/phoenix/modules/statement/block_statement.html</a> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5824 Trac 1.4.3 Thomas Heller Sat, 08 Oct 2011 02:59:55 GMT <link>https://svn.boost.org/trac10/ticket/5824#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5824#comment:1</guid> <description> <p> Can you provide a testcase that shows the wrong behaviour? </p> </description> <category>Ticket</category> </item> <item> <author>gredner@…</author> <pubDate>Mon, 10 Oct 2011 20:46:36 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/5824 https://svn.boost.org/trac10/ticket/5824 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">main.cpp</span> </li> </ul> <p> Self-contained test case illustrating the problem. The program compiles cleanly (with g++ 4.4.5 -Wall -Wextra -pedantic) both with and without the marked #include, but its observable behavior differs. </p> Ticket John Fletcher <J.P.Fletcher@…> Fri, 31 Jan 2014 22:11:17 GMT <link>https://svn.boost.org/trac10/ticket/5824#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5824#comment:2</guid> <description> <p> The problem is caused by the inclusion of a comma and therefore of a need to handle the comma correctly. </p> <p> As with 5715 the problem is that the user needs to include a header which is not obvious. The sensible way to deal with this is to take away that need by putting the extra header into something which is going to be included anyway given the nature of the user's problem. This is a little tricky as there is no obvious place to put an extra header which will get naturally included by a user. I have gone for the following. </p> <p> Put #include &lt;boost/phoenix/scope/local_variable.hpp&gt; into BOTH boost/phoenix/operator.hpp AND boost/phoenix/core.hpp </p> <p> Test bug5824 has been included in the test suite. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Kohei Takahashi</dc:creator> <pubDate>Sun, 18 Jun 2017 15:17:54 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/5824#comment:3 https://svn.boost.org/trac10/ticket/5824#comment:3 <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