From e3c25078289f7b32071204b717f4441a72d50259 Mon Sep 17 00:00:00 2001 From: planetmaker Date: Sat, 18 Sep 2021 19:45:07 +0200 Subject: [PATCH] Fix: [linux] Silence warnings about deprecated use of std::auto_ptr. Use std::unique_ptr for GCC > 4.4 --- nel/include/nel/misc/types_nl.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nel/include/nel/misc/types_nl.h b/nel/include/nel/misc/types_nl.h index a257eb2939..cc1282c3dd 100644 --- a/nel/include/nel/misc/types_nl.h +++ b/nel/include/nel/misc/types_nl.h @@ -515,7 +515,12 @@ extern void operator delete[](void *p) throw(); # define CHashMap ::__gnu_cxx::hash_map # define CHashSet ::__gnu_cxx::hash_set # define CHashMultiMap ::__gnu_cxx::hash_multimap -# define CUniquePtr ::std::auto_ptr +// From GCC 4.4 onward std:unique_ptr should be available in std library. It's deprectated later on +# if GCC_VERSION > 40400 +# define CUniquePtr ::std::unique_ptr +# else +# define CUniquePtr ::std::auto_ptr +# endif # define CUniquePtrMove namespace __gnu_cxx {