[Boost-bugs] [Boost C++ Libraries] #10981: boost::function breaks with assignment or construction from nullptr

Subject: [Boost-bugs] [Boost C++ Libraries] #10981: boost::function breaks with assignment or construction from nullptr
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-01-29 12:57:48


#10981: boost::function breaks with assignment or construction from nullptr
------------------------------+----------------------
 Reporter: anonymous | Owner: dgregor
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: function
  Version: Boost 1.57.0 | Severity: Problem
 Keywords: |
------------------------------+----------------------
 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;
 }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10981>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:17 UTC