Page MenuHomePhabricator

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

Authored by Fabien on Fri, Dec 28, 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.Fri, Dec 28, 23:13
Herald added a reviewer: Restricted Project. · View Herald TranscriptFri, Dec 28, 23:13
Herald added a subscriber: schancel. · View Herald Transcript
deadalnix requested changes to this revision.Sun, Dec 30, 12:18

Why not upgrade to C++14 instead ?

This revision now requires changes to proceed.Sun, Dec 30, 12:18
Fabien added a comment.Sun, Dec 30, 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.Sun, Dec 30, 13:15
deadalnix accepted this revision.Mon, Dec 31, 16:56
This revision is now accepted and ready to land.Mon, Dec 31, 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 WhyWed, Jan 2, 23:03
This revision was automatically updated to reflect the committed changes.