Library feature: std::invoke


Invoke gives a uniform way of calling methods and functions.

But why would we use this ?

Let’s try to call some class functions, assuming we have the following struct defined.

Before invoke:

After invoke:

This is pretty handy when you would like / need to call member functions.

You may also like...

Leave a Reply