16 #ifndef PAAL_OBJECT_WITH_COPY_HPP
17 #define PAAL_OBJECT_WITH_COPY_HPP
20 namespace data_structures {
57 template <
typename F,
typename... Args>
58 typename std::result_of<
F(T*, Args...)>::type
60 (m_copy.*(f))(args...);
61 return (m_obj.*(f))(args...);
75 template <
typename F,
typename... Args>
76 typename std::result_of<
F(T*, Args...)>::type
78 return (m_copy.*(f))(args...);
116 #endif // PAAL_OBJECT_WITH_COPY_HPP
const T & get_obj() const
getter for inner object
object_with_copy(T t)
constructor
std::result_of< F(T *, Args...)>::type invoke_on_copy(F f, Args...args) const
invokes member function on copy
std::result_of< F(T *, Args...)>::type invoke(F f, Args...args)
invokes member function on object and copy
T & get_obj()
getter for inner object
const T * operator->() const
easier way for invoking const member functions
keeps object and its copy. Invoke all the member functions on both: object and its copy...