12 #ifndef ZYPP_BASE_HASH_H 13 #define ZYPP_BASE_HASH_H 16 #include <unordered_set> 17 #include <unordered_map> 26 #define ZYPP_DEFINE_ID_HASHABLE(C) \ 28 template<class Tp> struct hash; \ 29 template<> struct hash<C> \ 31 size_t operator()( const C & __s ) const \ 32 { return __s.id(); } \ 41 inline unordered_set<D> *
rwcowClone(
const std::unordered_set<D> * rhs )
42 {
return new std::unordered_set<D>( *rhs ); }
45 template<
class K,
class V>
46 inline std::unordered_map<K,V> *
rwcowClone(
const std::unordered_map<K,V> * rhs )
47 {
return new std::unordered_map<K,V>( *rhs ); }
50 #endif // ZYPP_BASE_HASH_H
unordered_set< D > * rwcowClone(const std::unordered_set< D > *rhs)
clone function for RW_pointer