Boost C++ Libraries: Ticket #2127: function_equal should work with nested binds https://svn.boost.org/trac10/ticket/2127 <p> <a class="ext-link" href="http://lists.boost.org/Archives/boost/2008/07/139992.php"><span class="icon">​</span>http://lists.boost.org/Archives/boost/2008/07/139992.php</a> </p> <p> To fix the compiler error in the program below, add the following (e.g. to boost/bind.hpp) - </p> <pre class="wiki">namespace boost { namespace _bi { template&lt;class R, class F, class L&gt; bool ref_compare( bind_t&lt;R,F,L&gt; const &amp; a, bind_t&lt;R,F,L&gt; const &amp; b, long ) { return a.compare(b); } } } </pre><p> -- main.cpp -- </p> <pre class="wiki">#include &lt;boost/function_equal.hpp&gt; #include &lt;boost/bind.hpp&gt; void f( int ) {} int g( int i ) { return i+5; } template &lt; typename F &gt; bool self_equal( F f_ ) { return function_equal( f_, f_ ); } int main( int argc, char * const argv[] ) { self_equal( boost::bind( f, _1 ) ); // OK self_equal( boost::bind( g, _1 ) ); // OK self_equal( boost::bind( f, boost::bind( g, _1 ) ) ); // compiler error return 0; } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2127 Trac 1.4.3 Peter Dimov Thu, 21 Aug 2008 14:55:28 GMT status, milestone changed https://svn.boost.org/trac10/ticket/2127#comment:1 https://svn.boost.org/trac10/ticket/2127#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.35.1</span> → <span class="trac-field-new">Boost 1.37.0</span> </li> </ul> Ticket Peter Dimov Sat, 28 Feb 2009 16:58:39 GMT milestone changed https://svn.boost.org/trac10/ticket/2127#comment:2 https://svn.boost.org/trac10/ticket/2127#comment:2 <ul> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.37.0</span> → <span class="trac-field-new">Boost 1.39.0</span> </li> </ul> Ticket Peter Dimov Sun, 01 Mar 2009 16:31:55 GMT <link>https://svn.boost.org/trac10/ticket/2127#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2127#comment:3</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/51511" title="Refs #2127 (fixed in trunk).">[51511]</a>) Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2127" title="#2127: Bugs: function_equal should work with nested binds (closed: fixed)">#2127</a> (fixed in trunk). </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Peter Dimov</dc:creator> <pubDate>Mon, 02 Mar 2009 16:29:24 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/2127#comment:4 https://svn.boost.org/trac10/ticket/2127#comment:4 <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> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/51533" title="Merge [51511] to release. Closes #2127.">[51533]</a>) Merge <a class="changeset" href="https://svn.boost.org/trac10/changeset/51511" title="Refs #2127 (fixed in trunk).">[51511]</a> to release. Closes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2127" title="#2127: Bugs: function_equal should work with nested binds (closed: fixed)">#2127</a>. </p> Ticket