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: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Oct 2005 19:48:46 -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 #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