mirror of https://github.com/KLayout/klayout.git
changing ext/hash_(set|map) to unordered_(set|map) to avoid deprecation warning on mac.
This commit is contained in:
parent
568035cdd6
commit
f6d3995d6b
|
|
@ -23,17 +23,21 @@
|
|||
|
||||
#ifndef HDR_dbHash
|
||||
#define HDR_dbHash
|
||||
|
||||
#if defined(__GNUC__)
|
||||
# include <ext/hash_map>
|
||||
# include <ext/hash_set>
|
||||
namespace std_ext = __gnu_cxx;
|
||||
# define DB_HASH_NAMESPACE __gnu_cxx
|
||||
#else
|
||||
# include <hash_map>
|
||||
# include <hash_set>
|
||||
#if defined(__APPLE__) // clang compiler complains about deprecation warning on ext/hash_map and ext/hash_set
|
||||
# include <unordered_map>
|
||||
# include <unordered_set>
|
||||
# define DB_HASH_NAMESPACE std
|
||||
namespace std_ext = std;
|
||||
# define DB_HASH_NAMESPACE std
|
||||
#elif defined(__GNUC__)
|
||||
# include <ext/hash_map>
|
||||
# include <ext/hash_set>
|
||||
namespace std_ext = __gnu_cxx;
|
||||
# define DB_HASH_NAMESPACE __gnu_cxx
|
||||
#else
|
||||
# include <hash_map>
|
||||
# include <hash_set>
|
||||
namespace std_ext = std;
|
||||
# define DB_HASH_NAMESPACE std
|
||||
#endif
|
||||
|
||||
#include "dbPoint.h"
|
||||
|
|
@ -74,7 +78,7 @@ namespace DB_HASH_NAMESPACE
|
|||
};
|
||||
#endif
|
||||
|
||||
#if defined(_WIN64) || defined(__APPLE__)
|
||||
#if defined(_WIN64)
|
||||
/**
|
||||
* @brief Specialization missing for long long on WIN64
|
||||
*/
|
||||
|
|
@ -100,6 +104,13 @@ namespace DB_HASH_NAMESPACE
|
|||
};
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__)
|
||||
template<typename _Key, typename _Tp>
|
||||
using hash_map = unordered_map<_Key, _Tp>;
|
||||
template<typename _Value>
|
||||
using hash_set = unordered_set<_Value>;
|
||||
#endif
|
||||
|
||||
template <class T>
|
||||
inline size_t hfunc (const T &t)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue