HomePhabricator

gui: change combiner for signals to optional_last_value

Description

gui: change combiner for signals to optional_last_value

Summary:
optional_last_value, which does not throw, has replaced optional_value as
boost's default combiner. Besides being better supported, it also doesn't
trigger gcc's -Wmaybe-unitialized warning, presumably because exceptions no
longer bubble-up out of signals:

bash
boost/signals2/last_value.hpp:54:36: warning: '*((void*)& value +1)' may be used uninitialized in this function [-Wmaybe-uninitialized]
	if(value) return value.get();

The change in default happened in Boost 1.39.0 (along with the
introduction of the signals 2 library. More information is available here:

https://www.boost.org/doc/libs/1_73_0/doc/html/signals2/rationale.html#id-1.3.36.9.4

and here:

https://www.boost.org/doc/libs/1_73_0/doc/html/boost/signals2/optional_last_value.html

Co-authored-by: fanquake <fanquake@gmail.com>

This is a backport of core#19256

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D9970

Details

Provenance
Cory Fields <cory-nospam-@coryfields.com>Authored on May 26 2020, 17:43
PiRKCommitted on Aug 28 2021, 06:53
PiRKPushed on Aug 28 2021, 06:53
Reviewer
Restricted Project
Differential Revision
D9970: gui: change combiner for signals to optional_last_value
Parents
rABC27ed27aa1160: test: improve functional tests compatibility with BSD/macOS
Branches
Unknown
Tags
Unknown