This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/24243] [4.0 regression] lookup fails to match to function call, const-sensitive
- From: "fang at csl dot cornell dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Oct 2005 21:47:06 -0000
- Subject: [Bug c++/24243] [4.0 regression] lookup fails to match to function call, const-sensitive
- References: <bug-24243-3227@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from fang at csl dot cornell dot edu 2005-10-06 21:47 -------
I now second your opinions that this is invalid.
Upon closer examination, what I *should've* written to make this code valid is
the following:
template <class R, template <class> class P, class T, class A>
inline
const_mem_fun1_p_t<R, P, T, A>
mem_fun(R (T::*f)(A) const, const P<const T>& null) {
return const_mem_fun1_p_t<R, P, T, A>(f);
}
To be more correct, I changed "const P<T>" to "const P<const T>" in the
function parameter list.
Now gcc-3.3 to 4.0.x find the right match and accept it.
(So really, the previous versions 'accepts-invalid.')
Thanks for being patient with me on this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24243