mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
Merge #20413: build: Require C++17 compiler
fac7198728Use std::make_unique (MarcoFalke)faaee810e6build: 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: utACKfac7198728hebasto: ACKfac7198728, I've locally compiled on ARM 32bit SBC without GUI. fanquake: ACKfac7198728Tree-SHA512: 53eb40ba5d496376a2d2cf16e2000bef36616cc2a3696c3ec59a5366e41fa8b872817a7ca21751f030f9c1efb339dfa63cc655eaa5199b9a3d2e52c2de0ccb29
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user