Page MenuHomePhabricator

[backport#15308] Piecewise construct to avoid invalid construction
ClosedPublic

Authored by majcosta on May 19 2020, 23:18.

Details

Summary

In CMainSignals::RegisterWithMempoolSignals running under Ubuntu 14.04
(QT 5.2), absent piecewise construction this fails to create the pair
because the argument is a connection, which is converted into a
non-copyable scoped_connection.

validationinterface.cpp:80:186:   required from here
/usr/include/boost/signals2/connection.hpp:234:7: error: ‘boost::signals2::scoped_connection::scoped_connection(const boost::signals2::scoped_connection&)’ is private
       scoped_connection(const scoped_connection &other);
       ^
In file included from /usr/include/c++/4.8/utility:70:0,
                 from /usr/include/c++/4.8/algorithm:60,
                 from ./prevector.h:13,
                 from ./script/script.h:10,
                 from ./primitives/transaction.h:11,
                 from ./validationinterface.h:9,
                 from validationinterface.cpp:6:
/usr/include/c++/4.8/bits/stl_pair.h:134:45: error: within this context
  : first(std::forward<_U1>(__x)), second(__y) { }

https://travis-ci.org/bitcoin/bitcoin/jobs/473689141#L2172


This is a partial backport of Core PR15308

Test Plan
ninja check

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/validationinterface.cpp
6 ↗(On Diff #20315)

Move it with the other standard libs.

This revision is now accepted and ready to land.May 20 2020, 08:29