bothner@WSL.DEC.COM (09/11/89)
The following example is simplified from ET++. It compiles under g++ 1.35.0, and CC 1.2 (at least under vax/ultrix), but not under g++ 1.36.0- (at least not on sony/news). --Per class Class { public: Class(class Class*); friend char *ClassDeclFileName (char *p= "Class.h") { return p; } friend char *ClassDeclCompDir (char *p= "" ) { return p; } Class(char *dn, char *dcd ); }; typedef char *string; class StringAssoc { public: friend char *StringAssocDeclFileName (char *p= "AssocArray.h") { return p; } friend char *StringAssocDeclCompDir (char *p= "" ) { return p; } StringAssoc& operator[] (string s); }; static Class StringAssocClassMetaImpl0 (StringAssocDeclFileName (), StringAssocDeclCompDir () ); log: g++ version 1.35.1- /usr/local/lib/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -D__cplusplus -Dunix -Dbsd43 -Dsony -Dsony_news -Dmc68020 -Dnews800 -D__unix__ -D__bsd43__ -D__sony__ -D__sony_news__ -D__mc68020__ -D__news800__ -D__HAVE_68881__ assoc.C /tmp/cc009630.cpp GNU CPP version 1.35.98 /usr/local/lib/gcc-cc1plus /tmp/cc009630.cpp -quiet -dumpbase assoc.C -noreg -version -o /tmp/cc009630.s GNU C++ version 1.36.0- (based on GCC 1.35.98+) (68k, MIT syntax) compiled by GNU C version 1.35.98. default target switches: -m68020 -mc68020 -m68881 -mbitfield assoc.C:16: call of overloaded `StringAssocDeclFileName' is ambiguous assoc.C:16: call of overloaded `StringAssocDeclCompDir' is ambiguous assoc.C: In function void _GLOBAL_$I$assoc_C (): assoc.C:16: in base initialization for class `Class'