Re: [Boost-bugs] [Boost C++ Libraries] #2642: bug constructing from a reference to another boost::function

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #2642: bug constructing from a reference to another boost::function
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-09-02 02:43:30


#2642: bug constructing from a reference to another boost::function
------------------------------+---------------------------------------------
  Reporter: steven_watanabe | Owner: dgregor
      Type: Bugs | Status: reopened
 Milestone: Boost 1.38.0 | Component: function
   Version: Boost 1.37.0 | Severity: Problem
Resolution: | Keywords:
------------------------------+---------------------------------------------
Changes (by Yusaku Sugai <sugai@…>):

  * status: closed => reopened
  * resolution: fixed =>

Comment:

 The following code throws a bad_function_call exception with Boost
 1.40.0.[[BR]]
 It was OK with Boost 1.38.0.[[BR]]
 I suppose #2642 patch made reference to function(empty or not) to be
 always non-empty.[[BR]]

 {{{
 #include <boost/function.hpp>
 #include <boost/ref.hpp>

 int main() {
     boost::function<void()> f1;
     boost::function<void()> f2(boost::ref(f1));
     if (f2) {
         f2();
     }
 }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2642#comment:3>
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:01 UTC