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