[Bug c++/24243] [4.0 regression] lookup fails to match to function call, const-sensitive
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Oct 6 19:48:00 GMT 2005
------- Comment #2 from pinskia at gcc dot gnu dot org 2005-10-06 19:48 -------
Here is the reduced testcase:
template <class R, template <class> class P, class T, class A>
inline int mem_fun(R (T::*f)(A), const P<T>& null) {}
template <class T> class never_ptr {};
struct instance_collection_base {
int& pair_dump(int&) const;
static const never_ptr<const instance_collection_base> null;
};
int& dump(int& o) {
mem_fun(&instance_collection_base::pair_dump,
instance_collection_base::null);
}
But I think this is invalid as "const instance_collection_base" is not the same
as instance_collection_base. so T cannot be matched to "const
instance_collection_base" as it was before 4.1.0/4.0.2.
ICC and Comeau rejects the same code too for the same reason.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24243
More information about the Gcc-bugs
mailing list