Consider this program: 1 namespace Foo { 2 }; 3 4 class Foo { 5 }; 6 7 int main() { 8 class Foo1 : public Foo { 9 }; 10 Foo1 my_Foo1; 11 Foo my_foo; 12 return 0; 13 }
I would have expected an error message for line 4. Instead, I can on line 8 derive a class from Foo and instanciate it on line 10. However, on line 11, Foo ceases to be a class and becomes a namespace: Foo.C: In function 'int main()': Foo.C:11: error: expected primary-expression before 'my_foo' Foo.C:11: error: expected `;' before 'my_foo' Somewhat funny, isn't it? (VC++ 6.0 gets it right, I must sadly admit). Best, -ulrich [nosave] ---------------------------------------------------------------------------- Ulrich Lauther ph: +49 89 636 48834 fx: ... 636 42284 Siemens CT SE 6 Internet: [EMAIL PROTECTED] Siemens Aktiengesellschaft: Vorsitzender des Aufsichtsrats: Heinrich v. Pierer; Vorstand: Klaus Kleinfeld, Vorsitzender; Johannes Feldmayer, Joe Kaeser, Rudi Lamprecht, Eduardo Montes, Juergen Radomski, Erich R. Reinhardt, Hermann Requardt, Uriel J. Sharef, Klaus Wucherer Sitz der Gesellschaft: Berlin und Muenchen Registergericht: Berlin Charlottenburg, HRB 12300, Muenchen, HRB 6684 WEEE-Reg.-Nr. DE 23691322 _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus