12 #ifndef ZYPP_BASE_TR1HASH_H 13 #define ZYPP_BASE_TR1HASH_H 16 #include <tr1/unordered_set> 17 #include <tr1/unordered_map> 26 #define ZYPP_DEFINE_ID_HASHABLE(C) \ 27 namespace std { namespace tr1 { \ 28 template<class _Tp> struct hash; \ 29 template<> struct hash<C> \ 31 size_t operator()( const C & __s ) const \ 32 { return __s.id(); } \ 45 inline unordered_set<_D> *
rwcowClone(
const std::tr1::unordered_set<_D> * rhs )
46 {
return new std::tr1::unordered_set<_D>( *rhs ); }
49 template<
class _K,
class _V>
50 inline std::tr1::unordered_map<_K,_V> *
rwcowClone(
const std::tr1::unordered_map<_K,_V> * rhs )
51 {
return new std::tr1::unordered_map<_K,_V>( *rhs ); }
59 #endif // ZYPP_BASE_TR1HASH_H unordered_set< _D > * rwcowClone(const std::tr1::unordered_set< _D > *rhs)
clone function for RW_pointer