Opened 15 years ago
Closed 15 years ago
#1300 closed Bugs (invalid)
Comparing Boost.Function function objects doesn't work with VS2005 SP1
| Reported by: | Owned by: | Douglas Gregor | |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | function |
| Version: | Boost 1.34.1 | Severity: | Problem |
| Keywords: | Cc: |
Description
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.
#include <boost/function.hpp>
void foo() { }
void bar() { }
int main()
{
boost::function<void ()> f = &foo, b = &bar;
f == b;
}
I filed a bug report for Boost.Signals before (see http://svn.boost.org/trac/boost/ticket/1076). As I think it's actually a problem with Boost.Function I report it again addressing the correct library. I guess #1076 can be closed if this bug in Boost.Function is fixed.
Attachments (1)
Change History (2)
by , 15 years ago
comment:1 by , 15 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
This is not a bug. One cannot compare two Boost.Function objects. The rationale is described here:
Note:
See TracTickets
for help on using tickets.

Test case reproducing the problem