allow pointers to objects to be passed to calls with mem_fn
parent
c68742811b
commit
cdc63eaf63
|
@ -136,6 +136,16 @@ namespace octa {
|
|||
decltype(((obj).*(p_ptr))(args...)) const {
|
||||
return ((obj).*(p_ptr))(args...);
|
||||
}
|
||||
template<typename... A>
|
||||
auto operator()(T *obj, A &&...args) ->
|
||||
decltype(((obj)->*(p_ptr))(args...)) {
|
||||
return ((obj)->*(p_ptr))(args...);
|
||||
}
|
||||
template<typename... A>
|
||||
auto operator()(const T *obj, A &&...args) ->
|
||||
decltype(((obj)->*(p_ptr))(args...)) const {
|
||||
return ((obj)->*(p_ptr))(args...);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue