12 #ifndef ZYPP_BASE_HASH_H 13 #define ZYPP_BASE_HASH_H 16 #include <unordered_set> 17 #include <unordered_map> 38 #if defined(__cpp_modules) || defined(__clang__) 39 #define ZYPP_DEFINE_ID_HASHABLE(C) \ 41 template<> struct hash<C> \ 43 size_t operator()( const C & __s ) const \ 44 { return __s.id(); } \ 48 #define ZYPP_DEFINE_ID_HASHABLE(C) \ 50 template<class Tp> struct hash; \ 51 template<> struct hash<C> \ 53 size_t operator()( const C & __s ) const \ 54 { return __s.id(); } \ 64 inline unordered_set<D> *
rwcowClone(
const std::unordered_set<D> * rhs )
65 {
return new std::unordered_set<D>( *rhs ); }
68 template<
class K,
class V>
69 inline std::unordered_map<K,V> *
rwcowClone(
const std::unordered_map<K,V> * rhs )
70 {
return new std::unordered_map<K,V>( *rhs ); }
73 #endif // ZYPP_BASE_HASH_H
unordered_set< D > * rwcowClone(const std::unordered_set< D > *rhs)
clone function for RW_pointer