Summary: | [g++] using typename doesn't work in case template : template inheritance | ||
---|---|---|---|
Product: | gcc | Reporter: | Kirill Smelkov <smelkov> |
Component: | c++ | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | gcc-bugs |
Priority: | P2 | Keywords: | rejects-valid |
Version: | 4.0.0 | ||
Target Milestone: | --- | ||
Host: | i686-pc-linux-gnu | Target: | i686-pc-linux-gnu |
Build: | i686-pc-linux-gnu | Known to work: | |
Known to fail: | 2.95.3 3.0.4 3.2.3 3.3.3 3.4.0 4.0.0 4.1.0 | Last reconfirmed: | 2005-05-10 16:35:14 |
Description
Kirill Smelkov
2005-05-10 08:26:32 UTC
Your first example is valid code. And the second. And the third. But the fourth is invalid code and ICC in strict mode also rejects it. Confirmed, based on the first example, this comes down to using semantics which G++ does not always get right, there might be already a bug about this somewhere. And I was right, there was a bug about this already, see PR 14258 which I am going to mark this bug as a dup of. *** This bug has been marked as a duplicate of 14258 *** Excuse me. The following is unconditionally offtopic, but is there a way to use whole base namespace, say something like template<typename T> struct A { ... } template<typename T> struct B : A<T> { using A<T>::* ; or using A<T>::; }; /none of these works, but i think the idea is clear/ |