template<typename T> struct foo1 { T* next; };
struct foo2 : public foo1<foo2> {};
struct foo3 : public foo1<foo3>, public foo2 {using foo1<foo3>::next;};

int main() { foo3 f; f.next = 0; }


gets you:

~$ g++ foo.cc
foo.cc: In function 'int main()':
foo.cc:5: error: request for member 'next' is ambiguous
foo.cc:1: error: candidates are: foo2* foo1<foo2>::next
foo.cc:1: error:                 foo3* foo1<foo3>::next


-- 
           Summary: Ignores "using"
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: igodard at pacbell dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30623

Reply via email to