Skip to content

Commit

Permalink
Fix: [linux] Silence warnings about deprecated use of std::auto_ptr. …
Browse files Browse the repository at this point in the history
…Use std::unique_ptr for GCC > 4.4
  • Loading branch information
planetmaker committed Sep 20, 2021
1 parent 60cabbe commit 085de1b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions nel/include/nel/misc/types_nl.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
# define NL_COMP_GCC
#endif

#if defined(_HAS_CPP0X) || defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined(NL_COMP_VC_VERSION) && NL_COMP_VC_VERSION >= 110)
#if defined(_HAS_CPP0X) || defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined(__GNUG__) && __cplusplus >= 201103L) || (defined(NL_COMP_VC_VERSION) && NL_COMP_VC_VERSION >= 110)
# define NL_ISO_CPP0X_AVAILABLE
#endif

Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 085de1b

Please sign in to comment.