Use std::bind to remove arguments <p>I'm currently coding against a library that uses an event system to signify user interface interactions. Each listener can either be a pointer to an object and a function to call, or a std::function. For example, the MenuItem object defines an OnClick event that will call a function that takes a MenuItem*:</p> <pre><code>someMenuItem-&gt;OnClick.addListener( this, &amp;myObj.doSomeAction ); ... void myObj::doSomeAction( MenuItem* menuItem ) {} </code></pre> <p>or</p> <pre><code>someMenuItem-&gt;OnClick.addListener( []( MenuItem* menuItem ) {} ); </code></pre> <p>It's often the case that doSomeAction is part of the public API of the class that we might want to call for some reason other than the user selecting the menu item. Is it possible to use std::bind to throw away the MenuItem* argument so that <code>doSomeAction( MenuItem* menuItem )</code> could be defined as simply <code>doSomeAction()</code>?</p> <p>PS - I do realize that I could use lambdas to do the same thing, but if bind can do the same thing then it might be more stylistically pleasing to some.</p>