This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13590] [3.3/3.4/3.5 regression] [DR39] Non-existing ambiguity when inhering through virtuals two identical using declarations.
- From: "boris at kolpackov dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Aug 2004 14:31:40 -0000
- Subject: [Bug c++/13590] [3.3/3.4/3.5 regression] [DR39] Non-existing ambiguity when inhering through virtuals two identical using declarations.
- References: <20040106205426.13590.boris@kolpackov.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From boris at kolpackov dot net 2004-08-03 14:31 -------
Just found a non-academic example when this really hurts:
template<typename x>
struct base
{
void f ();
};
template <typename x>
struct a : virtual base<x>
{
using base<x>::f; // which f
void g ()
{
f ();
}
};
template <typename x>
struct b : virtual base<x>
{
using base<x>::f; // which f
void g ()
{
f ();
}
};
struct c : a<int>, b<int> {};
void
f ()
{
c c_;
c_.f ();
}
Here I use using-declaration to hind the compiler which f() I am using since it
does not depend on template parameter in any way. The result - call to c_.f ()
is ambiguous - IMO, is ridiculous.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13590