Created on 2008-02-14.00:00:00 last changed 171 months ago
Proposed resolution:
Change [depr.lib.binder.1st]:
template <class Fn> class binder1st : public unary_function<typename Fn::second_argument_type, typename Fn::result_type> { protected: Fnfnop; typename Fn::first_argument_type value; public: binder1st(const Fn& x, const typename Fn::first_argument_type& y); typename Fn::result_type operator()(const typename Fn::second_argument_type& x) const; typename Fn::result_type operator()(typename Fn::second_argument_type& x) const; };-1- The constructor initializes
fnop with x and value with y.-2- operator() returns
fnop(value,x).
Change [depr.lib.binder.2nd]:
template <class Fn> class binder2nd : public unary_function<typename Fn::first_argument_type, typename Fn::result_type> { protected: Fnfnop; typename Fn::second_argument_type value; public: binder2nd(const Fn& x, const typename Fn::second_argument_type& y); typename Fn::result_type operator()(const typename Fn::first_argument_type& x) const; typename Fn::result_type operator()(typename Fn::first_argument_type& x) const; };-1- The constructor initializes
fnop with x and value with y.-2- operator() returns
fnop(value,x).
N2521 and its earlier predecessors have moved the old binders from [lib.binders] to [depr.lib.binders] thereby introducing some renaming of the template parameter names (Operation -> Fn). During this renaming process the protected data member op was also renamed to fn, which seems as an unnecessary interface breakage to me - even if this user access point is probably rarely used.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg3810 |
2008-02-14 00:00:00 | admin | create |