[Boost-bugs] [Boost C++ Libraries] #9651: boost::signals2::optional_last_value does not propagate bool value

Subject: [Boost-bugs] [Boost C++ Libraries] #9651: boost::signals2::optional_last_value does not propagate bool value
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-02-10 22:05:59


#9651: boost::signals2::optional_last_value does not propagate bool value
----------------------------------------+----------------------
 Reporter: Braden McDaniel <braden@…> | Owner: fmhess
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: signals2
  Version: Boost 1.55.0 | Severity: Problem
 Keywords: |
----------------------------------------+----------------------
 `boost::signals2::optional_last_value` seems not to propagate a `false`
 `bool` value. Consider the following test program:

 {{{#!c++
 #include <boost/signals2.hpp>
 #include <iostream>

 bool f()
 {
   return false;
 }

 int main()
 {
   boost::signals2::signal<bool ()/*, boost::signals2::last_value<bool> */>
 sig;

   sig.connect(f);

   std::cout << std::boolalpha << sig() << std::endl;
 }
 }}}

 Even though the function `f` returns `false`, this program outputs `true`;
 unless the commented code is uncommented and the `last_value` combiner is
 used instead.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9651>
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:15 UTC