------- Additional Comments From igodard at pacbell dot net  2005-03-21 12:39 
-------
The same case but using derivation from classes rather than templates:

struct foo {};
struct bar : public foo {};
struct baz : public bar {};
struct baf : public foo, public baz {};
void F(foo&) {}
int main() { baf b; F(b); return 0; }


gives a much better diagnostic:

~/ootbc/members/src$ g++ foo.cc
foo.cc:4: warning: direct base `foo' inaccessible in `baf' due to ambiguity
foo.cc: In function `int main()':
foo.cc:6: error: `foo' is an ambiguous base of `baf'


-- 


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

Reply via email to