00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __MHASH_HH
00018 # define __MHASH_HH
00019
00020 # include <functional>
00021 # include <concept/concept_tools.hh>
00022 # include <type_traits/is_callable.hh>
00023 # include <wrappers/members.hh>
00024 # include <memory>
00025
00026 namespace aurelia {
00027
00028 DEF_MEMBER_WRAPPER(hash);
00029
00032 template <typename T, bool>
00033 struct try_member_hash;
00034
00035 template <typename T>
00036 struct try_member_hash<T, false>: public std::hash<T> {
00037 };
00038
00039 template <typename T>
00040 struct try_member_hash<T, true>: public member_hash {
00041 };
00042
00046 template <typename T>
00047 struct mhash:
00048 public try_member_hash
00049 <T, IF(catsfoot::is_callable<member_hash(const T)>)> {
00050 };
00051
00052 }
00053
00054 #endif