I would like to use either a native pointer to a class method, or an implementation of std::function , but without using lambda, i.e. write a callback in a different way:
class window : public window_base { private: std::function<void(renderer::*)()> m_display_callback_; ... void window::set_render_callback(renderer* rndr) { m_display_callback_ = [=]()->void{ rndr->clear(); rndr->display(); }; } } Is it possible to avoid this kind, i.e. get rid of lambda?
std::function<void(renderer::*)()>in generalstd::function<void(renderer::*)()>and why? - AnT