10 #ifndef __NODAMUSHI_REFHASH_HPP__ 11 #define __NODAMUSHI_REFHASH_HPP__ 12 # include <functional> 20 template<
typename T>
struct ref 30 if(
t == r.
t)
return true;
31 if(!
t || !r.
t)
return false;
36 if(
t == &r)
return true;
42 if(
t == &r)
return true;
48 if(
t == r)
return true;
49 if(!
t || !r)
return false;
52 explicit operator bool()
const{
return t;}
66 return key?std::hash<T>()(*key)+1:0;
69 return std::hash<T>()(key)+1;
76 #endif // __NODAMUSHI_REFHASH_HPP__ bool operator==(const T *r) const
size_t operator()(const ref< T > &key) const
const T & operator *() const
ref< T > ref_of(const T &t)
bool operator==(const T &r) const
size_t operator()(const T &key) const
bool operator==(T &&r) const
raw pointer container.(not managed)
bool operator==(const ref< T > &r) const