Page MenuHomePhabricator

Add MakeUnique (substitute for C++14 std::make_unique)
ClosedPublic

Authored by Fabien on Dec 28 2018, 23:13.

Details

Summary

Partial backport of core PR11043

Backported commits are 8617989, 3e09b39 and a357293

Depends on D2229

Test Plan
make check

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Dec 28 2018, 23:13
Herald added a reviewer: Restricted Project. · View Herald TranscriptDec 28 2018, 23:13
Herald added a subscriber: schancel. · View Herald Transcript
deadalnix requested changes to this revision.Dec 30 2018, 12:18

Why not upgrade to C++14 instead ?

This revision now requires changes to proceed.Dec 30 2018, 12:18
Fabien added a comment.Dec 30 2018, 13:15

Upgrade to c++14 is a work in progress.
I still need to figure out how to make it work with openbsd ; there is no c++14 support built-in the gcc versions available, so I'm trying to make it build and work with clang.

This change could be easily upgraded to c++14 make_unique when it becomes available (the same with the reverse iterator, rbegin() and rend() are standard in c++14).
This will eventually avoid merge conflicts when backporting PR which depends on this in the meantime.

Fabien requested review of this revision.Dec 30 2018, 13:15
deadalnix accepted this revision.Dec 31 2018, 16:56
This revision is now accepted and ready to land.Dec 31 2018, 16:56
Closed by commit rABCb170951cb902: Add MakeUnique (substitute for C++14 std::make_unique) (authored by practicalswift <practicalswift@users.noreply.github.com>, committed by Fabien). · Explain WhyJan 2 2019, 23:03
This revision was automatically updated to reflect the committed changes.