Boost C++ Libraries: Ticket #4084: [result_of, tr1] use of decltype in boost::result_of breaks <boost/tr1/functional.hpp> https://svn.boost.org/trac10/ticket/4084 <p> Boost.TR1 is supposed to provide an implementation of TR1's library functionality. The change to boost::result_of on truck to use decltype on supporting compilers makes Boost.TR1's implementation of std::tr1::result_of non-compliant, as evidenced by the recent Boost.TR1 regression test failures on c++0x toolsets. It also breaks Proto because there is a bug in the specification of decltype that causes code that is valid with TR1 result_of to break with the c++0x result_of. </p> <p> The attached patch fixes the issue with boost::result_of and &lt;boost/tr1/functional.hpp&gt;. It adds a new template in &lt;boost/utility/result_of.hpp&gt; called tr1_result_of that implements the TR1 result_of protocol regardless of whether decltype is available or not. It also changes &lt;boost/tr1/functional.hpp&gt; to define std::tr1::result_of in terms of boost::tr1_result_of. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4084 Trac 1.4.3 Eric Niebler Sun, 11 Apr 2010 23:19:07 GMT attachment set https://svn.boost.org/trac10/ticket/4084 https://svn.boost.org/trac10/ticket/4084 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">tr1_result_of.patch</span> </li> </ul> <p> updated attachment that puts the decltype implementation on a switch BOOST_RESULT_OF_USE_DECLTYPE </p> Ticket Eric Niebler Sun, 11 Apr 2010 23:22:16 GMT <link>https://svn.boost.org/trac10/ticket/4084#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4084#comment:1</guid> <description> <p> I've changed the patch so that boost::result_of only uses the decltype implementation if BOOST_RESULT_OF_USE_DECLTYPE is defined. This is a safer change that allows users to opt in to the brave new c++0x world without breaking users who aren't prepared to make that leap. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Eric Niebler</dc:creator> <pubDate>Tue, 13 Apr 2010 15:08:20 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4084#comment:2 https://svn.boost.org/trac10/ticket/4084#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> patch committed in changeset <a class="changeset" href="https://svn.boost.org/trac10/changeset/61248" title="add tr1_result_of that always behaves as TR1 specifies, fix ...">[61248]</a> </p> Ticket