18 #ifndef sitkMemberFunctionFactoryBase_h
19 #define sitkMemberFunctionFactoryBase_h
27 #include "Ancillary/type_list2.h"
28 #include "Ancillary/FunctionTraits.h"
30 #include <unordered_map>
40 struct hash :
public std::hash<T>
52 seed ^= hasher(val) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
55 template <
typename S,
typename T>
56 struct hash<std::pair<S, T>>
68 template <
class... TupleArgs>
69 struct hash<std::tuple<TupleArgs...>>
78 [&seed](
auto... tupleElement) { (
hash_combine(seed, tupleElement), ...); },tupleValue);
84 template <
typename TMemberFunctionPointer,
90 using ObjectType = typename ::detail::FunctionTraits<MemberFunctionType>::ClassType;
101 using FunctionObjectType = typename ::detail::FunctionTraits<MemberFunctionType>::FunctionObjectType;
111 template <
typename... Args>
115 return std::invoke(pfunc, objectPointer, std::forward<Args>(args)...);
129 #endif // sitkMemberFunctionFactoryBase_h