Created on 2008-10-06.00:00:00 last changed 161 months ago
Proposed resolution:
Change [function.objects]/2, header <functional> synopsis as follows:
// 20.7.14, member function adaptors: template<class R, class T> unspecified mem_fn(R T::*); template<class R, class T, class ...Args> unspecified mem_fn(R (T::*)(Args...)); template<class R, class T, class ...Args> unspecified mem_fn(R (T::*)(Args...) const); template<class R, class T, class ...Args> unspecified mem_fn(R (T::*)(Args...) volatile); template<class R, class T, class ...Args> unspecified mem_fn(R (T::*)(Args...) const volatile); template<class R, class T, class ...Args> unspecified mem_fn(R (T::*)(Args...) &); template<class R, class T, class ...Args> unspecified mem_fn(R (T::*)(Args...) const &); template<class R, class T, class ...Args> unspecified mem_fn(R (T::*)(Args...) volatile &); template<class R, class T, class ...Args> unspecified mem_fn(R (T::*)(Args...) const volatile &); template<class R, class T, class ...Args> unspecified mem_fn(R (T::*)(Args...) &&); template<class R, class T, class ...Args> unspecified mem_fn(R (T::*)(Args...) const &&); template<class R, class T, class ...Args> unspecified mem_fn(R (T::*)(Args...) volatile &&); template<class R, class T, class ...Args> unspecified mem_fn(R (T::*)(Args...) const volatile &&);
Change the prototype list of [func.memfn] as follows [NB: The following text, most notably p.2 and p.3 which discuss influence of the cv-qualification on the definition of the base class's first template parameter remains unchanged. ]:
template<class R, class T> unspecified mem_fn(R T::* pm); template<class R, class T, class ...Args> unspecified mem_fn(R (T::* pm)(Args...)); template<class R, class T, class ...Args> unspecified mem_fn(R (T::* pm)(Args...) const); template<class R, class T, class ...Args> unspecified mem_fn(R (T::* pm)(Args...) volatile); template<class R, class T, class ...Args> unspecified mem_fn(R (T::* pm)(Args...) const volatile); template<class R, class T, class ...Args> unspecified mem_fn(R (T::* pm)(Args...) &); template<class R, class T, class ...Args> unspecified mem_fn(R (T::* pm)(Args...) const &); template<class R, class T, class ...Args> unspecified mem_fn(R (T::* pm)(Args...) volatile &); template<class R, class T, class ...Args> unspecified mem_fn(R (T::* pm)(Args...) const volatile &); template<class R, class T, class ...Args> unspecified mem_fn(R (T::* pm)(Args...) &&); template<class R, class T, class ...Args> unspecified mem_fn(R (T::* pm)(Args...) const &&); template<class R, class T, class ...Args> unspecified mem_fn(R (T::* pm)(Args...) volatile &&); template<class R, class T, class ...Args> unspecified mem_fn(R (T::* pm)(Args...) const volatile &&);
Remove [func.memfn]/5:
Remarks: Implementations may implement mem_fn as a set of overloaded function templates.
[ 2009-10 Santa Cruz: ]
Move to Ready.
[ 2009-10-10 Daniel updated wording to post-concepts. ]
1230 has a similar proposed resolution
[ Batavia (2009-05): ]
We need to think about whether we really want to go down the proposed path of combinatorial explosion. Perhaps a Note would suffice.
We would really like to have an implementation before proceeding.
Move to Open, and recommend this be deferred until after the next Committee Draft has been issued.
[ Post Summit Daniel provided wording. ]
Daniel Krügler wrote:
Shouldn't above list be completed for &- and &&-qualified member functions This would cause to add:
template<Returnable R, class T, CopyConstructible... Args> unspecified mem_fn(R (T::* pm)(Args...) &); template<Returnable R, class T, CopyConstructible... Args> unspecified mem_fn(R (T::* pm)(Args...) const &); template<Returnable R, class T, CopyConstructible... Args> unspecified mem_fn(R (T::* pm)(Args...) volatile &); template<Returnable R, class T, CopyConstructible... Args> unspecified mem_fn(R (T::* pm)(Args...) const volatile &); template<Returnable R, class T, CopyConstructible... Args> unspecified mem_fn(R (T::* pm)(Args...) &&); template<Returnable R, class T, CopyConstructible... Args> unspecified mem_fn(R (T::* pm)(Args...) const &&); template<Returnable R, class T, CopyConstructible... Args> unspecified mem_fn(R (T::* pm)(Args...) volatile &&); template<Returnable R, class T, CopyConstructible... Args> unspecified mem_fn(R (T::* pm)(Args...) const volatile &&);
yes, absolutely. Thanks for spotting this. Without this change mem_fn cannot be initialized from pointer to ref-qualified member function. I believe semantics of such function pointer is well defined.
History | |||
---|---|---|---|
Date | User | Action | Args |
2011-08-23 20:07:26 | admin | set | status: wp -> c++11 |
2010-10-21 18:28:33 | admin | set | messages: + msg4374 |
2010-10-21 18:28:33 | admin | set | messages: + msg4373 |
2010-10-21 18:28:33 | admin | set | messages: + msg4372 |
2010-10-21 18:28:33 | admin | set | messages: + msg4371 |
2010-10-21 18:28:33 | admin | set | messages: + msg4370 |
2008-10-06 00:00:00 | admin | create |