cvs: ICE on using using
Volker Reichelt
reichelt@igpm.rwth-aachen.de
Fri Jan 31 18:25:00 GMT 2003
Hi Markus,
your example is ill-formed. Let's consider an slightly shortened
version:
------------------------snip here-------------------------
class C
{
enum Enum { one, too, tree };
};
template <class T>
struct Test
{
void DoSomething() { using T::one; }
};
------------------------snip here-------------------------
If you want to import a name from a class (and not a namespace),
this class has to be a base class, and the using declaration must be
in class scope. Thus, a corrected version could be:
------------------------snip here-------------------------
class C
{
enum Enum { one, too, tree };
};
template <class T>
struct Test : T
{
using T::one;
void DoSomething() { }
};
------------------------snip here-------------------------
which compiles with gcc 3.2, 3.3 and mainline.
Since an ICE is a bug nevertheless, I'll file a PR anyway.
Regards,
Volker
More information about the Gcc-bugs
mailing list