diff options
author | fanquake <fanquake@gmail.com> | 2020-11-19 09:43:31 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2020-11-19 10:29:05 +0800 |
commit | ea7926527ce36c05cacb99602b2b59579ff646e8 (patch) | |
tree | 22816318266f663370334b0ced7e87abc3d30524 /src | |
parent | 50e019a97a5b49caee867ec7d630fca908caed9d (diff) | |
parent | fac71987281077aed7f79dce99f4eb3e8a91916a (diff) | |
download | bitcoin-ea7926527ce36c05cacb99602b2b59579ff646e8.tar.xz |
Merge #20413: build: Require C++17 compiler
fac71987281077aed7f79dce99f4eb3e8a91916a Use std::make_unique (MarcoFalke)
faaee810e62d796d66bfb2bc4e53c8b4c8104d13 build: Require C++17 compiler (MarcoFalke)
Pull request description:
Developers have been compiling with C++17 for a few months now (fuzz tests and the msvc build have it even enabled by default). According to #16684, the 22.0 release shall be compiled with C++17 enabled.
This only sets the build flag, any other changes need more discussion and can be done later.
ACKs for top commit:
elichai:
utACK fac71987281077aed7f79dce99f4eb3e8a91916a
hebasto:
ACK fac71987281077aed7f79dce99f4eb3e8a91916a, I've locally compiled on ARM 32bit SBC without GUI.
fanquake:
ACK fac71987281077aed7f79dce99f4eb3e8a91916a
Tree-SHA512: 53eb40ba5d496376a2d2cf16e2000bef36616cc2a3696c3ec59a5366e41fa8b872817a7ca21751f030f9c1efb339dfa63cc655eaa5199b9a3d2e52c2de0ccb29
Diffstat (limited to 'src')
-rw-r--r-- | src/util/memory.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/memory.h b/src/util/memory.h index 15ecf8f80d..4d73b32869 100644 --- a/src/util/memory.h +++ b/src/util/memory.h @@ -10,10 +10,11 @@ #include <utility> //! Substitute for C++14 std::make_unique. +//! DEPRECATED use std::make_unique in new code. template <typename T, typename... Args> std::unique_ptr<T> MakeUnique(Args&&... args) { - return std::unique_ptr<T>(new T(std::forward<Args>(args)...)); + return std::make_unique<T>(std::forward<Args>(args)...); } #endif |