00001 #ifndef hash_by_call_HEADER 00002 #define hash_by_call_HEADER 00003 00004 /*************************************************************************** 00005 * Benoit Hudson (C) 2007. 00006 ***************************************************************************/ 00007 00008 namespace hudson { 00010 template <class C> struct hash_by_call { 00011 size_t operator()(const C& c) const { return c.hash(); } 00012 }; 00013 00015 template <class C> struct hash_by_call<C*> { 00016 size_t operator()(const C *c) const { return c->hash(); } 00017 }; 00018 00019 } // namespace hudson 00020 #endif
1.4.6