Advertisement
Guest User

Untitled

a guest
Apr 16th, 2013
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1.  
  2. namespace std {
  3. template<typename T> struct hash_traits {
  4. template<typename A, typename B> struct heterogenous {
  5. bool operator()(const T& t) { return false; }
  6. };
  7. };
  8. template<> struct hash_traits<std::hash<>> {
  9. template<typename A, typename B> struct heterogenous;
  10. };
  11. template<typename T> struct hash_traits<std::hash<>>::heterogenous<std::unique_ptr<T>, T*> {
  12. bool operator()(std::hash<>) { return true; }
  13. };
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement