Page MenuHomePhabricator

Use std for make_pair in walletdb.cpp
ClosedPublic

Authored by freetrader on Jul 28 2017, 21:42.

Details

Summary

As described

Test Plan

make check
../qa/pull-tester/rpc-tests.py -extended

Diff Detail

Repository
rABC Bitcoin ABC
Branch
use_std_make_pair
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 607
Build 607: arc lint + arc unit

Event Timeline

Herald added 1 blocking reviewer(s): Restricted Project. · View Herald TranscriptJul 28 2017, 21:42
deadalnix requested changes to this revision.Jul 28 2017, 22:00

You are fixing symptoms. Where does the make_pair imported here come from ?

This revision now requires changes to proceed.Jul 28 2017, 22:00

I think you are right that a search needs to be made.
Demangling the make_pair related symbols in src/wallet/libbitcoin_wallet_a-walletdb.o showed them as being std::make_pair (without this patch applied).
So they are coming from somewhere.

freetrader requested review of this revision.EditedAug 11 2017, 22:35
freetrader edited edge metadata.

After eliminating all occurrences of 'using namespace std', I found that make_pair still does not need to be qualified in this file, nor in others (e.g. net_processing.cpp).
This leaves only Boost as the source (ref. http://www.boost.org/doc/libs/1_46_1/doc/html/boost/proto/functional/make_pair.html).

If this patch were to be applied, there would be 8 instances of unqualified make_pair() use left over in the codebase, versus 134 qualified uses.
Since we want to move away from Boost, I think we should consistently apply the std:: qualifier to all make_pair() uses.

This revision is now accepted and ready to land.Aug 12 2017, 00:00
This revision was automatically updated to reflect the committed changes.