Boost C++ Libraries: Ticket #1300: Comparing Boost.Function function objects doesn't work with VS2005 SP1 https://svn.boost.org/trac10/ticket/1300 <p> Comparing Boost.Function function objects doesn't work with Visual Studio 2005 SP 1 -the compiler reports error C2666: 'boost::operator ==' : 4 overloads have similar conversions. </p> <pre class="wiki">#include &lt;boost/function.hpp&gt; void foo() { } void bar() { } int main() { boost::function&lt;void ()&gt; f = &amp;foo, b = &amp;bar; f == b; } </pre><p> I filed a bug report for Boost.Signals before (see <a class="ext-link" href="http://svn.boost.org/trac/boost/ticket/1076"><span class="icon">​</span>http://svn.boost.org/trac/boost/ticket/1076</a>). As I think it's actually a problem with Boost.Function I report it again addressing the correct library. I guess <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1076" title="#1076: Bugs: compile error: disconnecting struct with operator()() doesn't work in ... (closed: wontfix)">#1076</a> can be closed if this bug in Boost.Function is fixed. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1300 Trac 1.4.3 boris@… Fri, 05 Oct 2007 08:49:51 GMT attachment set https://svn.boost.org/trac10/ticket/1300 https://svn.boost.org/trac10/ticket/1300 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">Test.cpp</span> </li> </ul> <p> Test case reproducing the problem </p> Ticket Douglas Gregor Sat, 06 Oct 2007 09:26:18 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/1300#comment:1 https://svn.boost.org/trac10/ticket/1300#comment:1 <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">invalid</span> </li> </ul> <p> This is not a bug. One cannot compare two Boost.Function objects. The rationale is described here: </p> <blockquote> <p> <a href="http://www.boost.org/doc/html/function/faq.html#id1215129">http://www.boost.org/doc/html/function/faq.html#id1215129</a> </p> </blockquote> Ticket