This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/24243] [4.0 regression] lookup fails to match to function call, const-sensitive



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]