mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-04 04:39:33 +01:00
Proper OSX/CLANG/CXX11 support in stl_delete.h
- replaces fix in 066df0d218
- Check if _LIBCPP_VECTOR is defined for vector_delete.
This is defined in libc++'s headers which Apple is using
instead of libstdc++
This commit is contained in:
parent
14a7941b5d
commit
bfbc55a673
1 changed files with 2 additions and 9 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue