Note: This paper explores potential future standardization directions and alternatives. It does not discuss or propose to amend the C++14 Committee Draft paper whose ballot is currently in progress.
A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.
Document number: N3702
Date: 2013-06-28
Introducing an optional parameter for mem_fn, which allows to bind an object to its member function
by Mikhail Semenov
Excerpt:
When a member function is used as a parameter to another function (the latter is usually called a functional) it is often necessary to provide the corresponding class object as a parameter as well. But functionals, like for example an integral, are often written to accept one global function. In cases when a member function and an object are needed, it is necessary to bind them together, so that the result can be supplied to the corresponding functional as one parameter. ...
... The proposal is to allow
mem_fn
to accept a second, optional parameter.
Add a Comment
Comments are closed.