Opened 8 years ago

#10981 new Bugs

boost::function breaks with assignment or construction from nullptr

Reported by: anonymous Owned by: Douglas Gregor
Milestone: To Be Determined Component: function
Version: Boost 1.57.0 Severity: Problem
Keywords: Cc:

Description

Repro:

#include <boost/function.hpp>

int main() {
    boost::function<int()> foo;
    foo = nullptr;
}

This appears to hit the operator= overload taking a functor. An overload for std::nullptr_t should probably be added.

There appears to be a similar issue with the constructor as well:

#include <boost/function.hpp>

int main() {
    boost::function<int()> foo = nullptr;
}

Change History (0)

Note: See TracTickets for help on using tickets.