hash_by_call.h

Go to the documentation of this file.
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

Generated on Thu Mar 27 19:04:14 2008 by  doxygen 1.4.6