diff options
author | Michael Fisher <mfisher31@gmail.com> | 2013-07-16 20:46:46 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-08-08 15:26:17 -0400 |
commit | bfbc55a6737a5c80691186f456f28f58fb9399e0 (patch) | |
tree | e36443e3b3b6574e20387165869f590db954d8ff | |
parent | 14a7941b5dde9fe6483bea87b38b131e29ffa8f1 (diff) |
Proper OSX/CLANG/CXX11 support in stl_delete.h
- replaces fix in 066df0d218ee4391eb3e15259deca5ccc190ed84
- Check if _LIBCPP_VECTOR is defined for vector_delete.
This is defined in libc++'s headers which Apple is using
instead of libstdc++
-rw-r--r-- | libs/pbd/pbd/stl_delete.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/libs/pbd/pbd/stl_delete.h b/libs/pbd/pbd/stl_delete.h index ac2161560c..bca0ea9e21 100644 --- a/libs/pbd/pbd/stl_delete.h +++ b/libs/pbd/pbd/stl_delete.h @@ -21,17 +21,10 @@ #define __libmisc_stl_delete_h__ -#if __clang__ && __APPLE__ && __cplusplus >= 201103L -#include <vector> -#ifndef _CPP_VECTOR -#define _CPP_VECTOR -#endif -#endif - /* To actually use any of these deletion functions, you need to first include the revelant container type header. */ -#if defined(_CPP_VECTOR) || defined(_GLIBCXX_VECTOR) || defined(__SGI_STL_VECTOR) +#if defined(_CPP_VECTOR) || defined(_GLIBCXX_VECTOR) || defined(__SGI_STL_VECTOR) || defined(_LIBCPP_VECTOR) template<class T> void vector_delete (std::vector<T *> *vec) { typename std::vector<T *>::iterator i; @@ -41,7 +34,7 @@ template<class T> void vector_delete (std::vector<T *> *vec) } vec->clear (); } -#endif // _CPP_VECTOR || _GLIBCXX_VECTOR || __SGI_STL_VECTOR +#endif // _CPP_VECTOR || _GLIBCXX_VECTOR || __SGI_STL_VECTOR || _LIBCPP_VECTOR #if defined(_CPP_MAP) || defined(_GLIBCXX_MAP) || defined(__SGI_STL_MAP) template<class K, class T> void map_delete (std::map<K, T *> *m) |