Topic: Nested class a return type
Author: lang@ind.e-technik.uni-stuttgart.de (Martin Lang)
Date: 11 Nov 1994 12:31:15 GMT Raw View
Here is some piece of code I'm not sure, if its legal. Some
compilers complain, others don't. I could not find a clear
statement in the ARM.
class Outer {
protected:
class Inner {
...
};
Inner f();
};
Some compilers now complain when defining function f
Outer::Inner f()
{...}
To me it makes perfectly sense in having a nested class as return
type. Since function f itself a protected member the nested
type could never get outside the scope of the class.
Any comments?
Martin
--
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Martin Lang | Martin Lang +
+ Universitaet Stuttgart, IND | University of Stuttgart, IND +
+ Institut fuer Nachrichtenverm. | Institute of Communications +
+ und Datenverarbeitung | Switching and Data Technics +
+ Seidenstrasse 36 | Seidenstrasse 36 +
+ D-70174 Stuttgart | D-70174 Stuttgart, Germany +
++++++++++++++++++++++++++++++++++++++|++++++++++++++++++++++++++++++++++++++
+ +
+ Phone: +49 711 121 2490 +
+ Fax : +49 711 121 2477 +
+ Email: lang@ind.e-technik.uni-stuttgart.de +
+ +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++