[Bug c++/52620] using cannot import types in (non direct) base classes

akim.demaille at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Mar 19 16:31:00 GMT 2012


--- Comment #2 from Akim Demaille <akim.demaille at gmail dot com> 2012-03-19 16:16:37 UTC ---
(I pasted the wrong bug report, I meant

(In reply to comment #1)
> template <typename T>
> struct bot: med<T>
> {
>   using top::type;
> This is not valid, med<T> is a dependent base class so name lookup never looks
> in it, so top is not known to be a base class.

Ah, thanks for the clarification!

> If you remove that line G++ accepts the code.

Ah, somehow I broke my tests.  4.6.3 does not accept it (and is the compiler
I am actually using), but you are right that 4.7.0 is fine with it.

> > PS/  It is extremely confusing to be submit[ted] possible "duplicates"
> > that are not even C++ :(
> I assume you mean the list of possible dups when filling in the form?
> Your "C++" bug might actually be a middle-end bug, or a preprocessor bug, or
> something else, so it makes sense to look for dups across the whole database.

Candidates were about Java :)  But I understand, thanks.

More information about the Gcc-bugs mailing list