Boost C++ Libraries: Ticket #5687: some evaluation functions do not work with BOOST_RESULT_OF_USE_DECLTYPE https://svn.boost.org/trac10/ticket/5687 <p> Codes using <code>phoenix::construct</code> fail to compile in C++0x with <code>BOOST_RESULT_OF_USE_DECLTYPE</code> (Tested on gcc 4.6.1 and clang TOT). Here is a minimal test code: </p> <pre class="wiki">#define BOOST_RESULT_OF_USE_DECLTYPE #include &lt;boost/phoenix/core.hpp&gt; #include &lt;boost/phoenix/object/construct.hpp&gt; int main (int argc, char* argv[]) { boost::phoenix::construct&lt;int&gt;()(); return 0; } </pre><p> Also, you can get the compile error by compiling <code>libs/phoenix/test/object/new_delete_tests.cpp</code> with <code>BOOST_RESULT_OF_USE_DECLTYPE</code>. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5687 Trac 1.4.3 Michel MORIN <mimomorin@…> Wed, 13 Jul 2011 04:53:19 GMT <link>https://svn.boost.org/trac10/ticket/5687#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5687#comment:1</guid> <description> <p> <code>phoenix::new_</code> does not work with <code>BOOST_RESULT_OF_USE_DECLTYPE</code>, too. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Thomas Heller</dc:creator> <pubDate>Wed, 13 Jul 2011 06:26:13 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/5687#comment:2 https://svn.boost.org/trac10/ticket/5687#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket Thomas Heller Wed, 13 Jul 2011 07:24:56 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/5687#comment:3 https://svn.boost.org/trac10/ticket/5687#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Thanks for the report, fixed on trunk. </p> Ticket Thomas Heller Wed, 13 Jul 2011 07:52:16 GMT version changed https://svn.boost.org/trac10/ticket/5687#comment:4 https://svn.boost.org/trac10/ticket/5687#comment:4 <ul> <li><strong>version</strong> <span class="trac-field-old">Boost Development Trunk</span> → <span class="trac-field-new">Boost 1.47.0</span> </li> </ul> Ticket Michel MORIN <mimomorin@…> Wed, 13 Jul 2011 08:26:54 GMT <link>https://svn.boost.org/trac10/ticket/5687#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5687#comment:5</guid> <description> <p> Confirmed the fix. Thanks for your quick work, Thomas! </p> <p> BTW, many other structs (<code>xxxx_eval</code>) need this kind of fixes. Could you run the tests (<code>libs/phoenix/test</code>) with defining <code>BOOST_RESULT_OF_USE_DECLTYPE</code>? Then, you'll see many compiler errors. </p> <p> Of course, if you want, I can run the tests and report which files need to be fixed. (But it might take some time, since my knowledge about bjam is scarse.) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Thomas Heller</dc:creator> <pubDate>Wed, 13 Jul 2011 08:41:45 GMT</pubDate> <title>status, summary changed; resolution deleted https://svn.boost.org/trac10/ticket/5687#comment:6 https://svn.boost.org/trac10/ticket/5687#comment:6 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> <li><strong>summary</strong> <span class="trac-field-old">phoenix::construct does not work with BOOST_RESULT_OF_USE_DECLTYPE</span> → <span class="trac-field-new">some evaluation functions do not work with BOOST_RESULT_OF_USE_DECLTYPE</span> </li> </ul> <p> Something went wrong then, thought i ran the tests with this compiler flag. Will check it again. FWIW, this is how my user_config.jam (in my home directory) looks like for gcc with C++0x enabled: </p> <pre class="wiki">using gcc : c++0x : /usr/bin/g++ : &lt;compileflags&gt;"-DBOOST_RESULT_OF_USE_DECLTYPE --std=c++0x -ansi -pedantic -Wextra -Wno-long-long -Wno-sign-compare -Wno-unused-function -Wno-deprecated -Wno-missing-braces" ; </pre><p> invoke bjam with toolset=gcc-c++0x and it should work. </p> <p> Bug is reopened until everything else is fixed. </p> Ticket Thomas Heller Wed, 13 Jul 2011 08:56:56 GMT <link>https://svn.boost.org/trac10/ticket/5687#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5687#comment:7</guid> <description> <p> update: It must read: </p> <pre class="wiki">using gcc : c++0x : /usr/bin/g++ : &lt;compileflags&gt;"-DBOOST_RESULT_OF_USE_DECLTYPE -ansi -pedantic --std=c++0x -Wextra -Wno-long-long -Wno-sign-compare -Wno-unused-function -Wno-deprecated -Wno-missing-braces" ; </pre> </description> <category>Ticket</category> </item> <item> <author>Michel MORIN <mimomorin@…></author> <pubDate>Wed, 13 Jul 2011 09:05:47 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5687#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5687#comment:8</guid> <description> <p> Just to be clear: the bugs in <code>phoenix::construct</code> and <code>phoenix::new_</code> are already fixed (and no new bugs are created by the fix). </p> <p> In my last comment, I just reported that there are similar bugs in <code>phoenix</code>. For example, <code>libs/phoenix/test/statement/if_tests.cpp</code> fails to compile. </p> <p> Sorry for confusing you. Should I make another ticket? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Thomas Heller</dc:creator> <pubDate>Wed, 13 Jul 2011 09:10:11 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5687#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5687#comment:9</guid> <description> <p> No confusion happened ;) </p> <p> I renamed the ticket. So I think it should be fine. Also, the fix is almost done ... running tests right now. </p> </description> <category>Ticket</category> </item> <item> <author>Michel MORIN <mimomorin@…></author> <pubDate>Sun, 17 Jul 2011 03:39:22 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5687#comment:10 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5687#comment:10</guid> <description> <p> Ah, I missed the new title of the ticket! </p> <p> And thanks for the hint about bjam, now I can run the tests with BOOST_RESULT_OF_USE_DECLTYPE :) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Thomas Heller</dc:creator> <pubDate>Sun, 09 Oct 2011 02:47:40 GMT</pubDate> <title>milestone changed https://svn.boost.org/trac10/ticket/5687#comment:11 https://svn.boost.org/trac10/ticket/5687#comment:11 <ul> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.48.0</span> → <span class="trac-field-new">To Be Determined</span> </li> </ul> Ticket Michel Morin Tue, 15 May 2012 13:30:07 GMT <link>https://svn.boost.org/trac10/ticket/5687#comment:12 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5687#comment:12</guid> <description> <p> Thomas, what is the current situation of this ticket? </p> <p> In trunk, decltype-based <code>result_of</code> is <strong>enabled by default</strong> on a compiler with N3276 decltype support (such as clang 3.1). This means that some existing codes fail to compile on such compilers. (Users have an option to disable decltype-based <code>result_of</code> by defining <code>BOOST_RESULT_OF_USE_TR1</code>.) </p> <p> I tested Boost.Phoenix on clang (which implements N3276 decltype) in a C++11 mode. The following tests fail to compile: </p> <ul><li>libs/phoenix/test/bind_not_test.test </li><li>libs/phoenix/test/bind_rv_sp_test.test </li><li>libs/phoenix/test/bind_stateful_test.test </li><li>libs/phoenix/test/bind_test.test </li><li>libs/phoenix/test/bug3289.test </li><li>libs/phoenix/test/dynamic_tests.test </li><li>libs/phoenix/test/exceptions.test </li><li>libs/phoenix/test/if_tests.test </li><li>libs/phoenix/test/lambda_tests.test </li><li>libs/phoenix/test/loops_tests.test </li><li>libs/phoenix/test/member.test </li><li>libs/phoenix/test/new_delete_tests.test </li><li>libs/phoenix/test/switch_tests.test </li></ul><p> You can see the error messages at <a href="http://www.boost.org/development/tests/trunk/developer/phoenix.html">http://www.boost.org/development/tests/trunk/developer/phoenix.html</a> (<code>clang-cxx11-r156741</code> test runner). </p> <p> Also, some tests of Boost.Spirit fail to compile due to the dependency on Boost.Phoenix: </p> <ul><li>libs/spirit/test/lex_regression_file_iterator3-p3.test </li></ul> </description> <category>Ticket</category> </item> <item> <author>Mehmet Ozan Kabak <wanderer2@…></author> <pubDate>Tue, 28 Aug 2012 01:43:00 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5687#comment:13 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5687#comment:13</guid> <description> <p> I also encountered this problem in 1.51 release, so it seems to still need fixing. </p> </description> <category>Ticket</category> </item> </channel> </rss>