0

I have would like to be able to treat a method declared as void T::f() as void (*)(T*). Is this a valid conversion (ie can it be safely called and the first argument will be put into this)?

2
  • 5
    Short answer, no. Commented Jul 28, 2019 at 23:06
  • Use a lambda to do the trick: [](T* t){ t->f(); } Commented Jul 28, 2019 at 23:17

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.