mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
merge #20413: Require C++17 compiler
This commit is contained in:
parent
f9505c7133
commit
140997f4b7
14
configure.ac
14
configure.ac
@ -61,18 +61,8 @@ case $host in
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_ARG_ENABLE([c++17],
|
||||
[AS_HELP_STRING([--enable-c++17],
|
||||
[enable compilation in c++17 mode (disabled by default)])],
|
||||
[use_cxx17=$enableval],
|
||||
[use_cxx17=no])
|
||||
|
||||
dnl Require C++14 or C++17 compiler (no GNU extensions)
|
||||
if test "x$use_cxx17" = xyes; then
|
||||
AX_CXX_COMPILE_STDCXX([17], [noext], [mandatory])
|
||||
else
|
||||
AX_CXX_COMPILE_STDCXX([14], [noext], [mandatory])
|
||||
fi
|
||||
dnl Require C++17 compiler (no GNU extensions)
|
||||
AX_CXX_COMPILE_STDCXX([17], [noext], [mandatory])
|
||||
|
||||
dnl Check if -latomic is required for <std::atomic>
|
||||
CHECK_ATOMIC
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user