Topic: typedefnames as classnames


Author: kearns@softrue.UUCP (Steven Kearns)
Date: 24 Feb 91 18:33:39 GMT
Raw View
In ARM 7.1.3, p. 107, it is indicated that a typedefname that names a class
is a className.  I assume that this means it can be used wherever a classname
can be used.  There is one exception, though:  such a typedefname cannot
be used after a struct,union,class keyword.

My interpretation of this is as follows:

struct S;
typedef S S_syn;
struct S_syn { .... };   // error
{  // enter a new scope
 struct S_syn { ... };  // no error, redefining S_syn
}

If my interpretation is correct, the text should be ammended to read something
like "such a typedefname cannot be used after a struct,union,class keyword,
IN THE SAME SCOPE".

********************************************************
* Steven Kearns            ....uunet!softrue!kearns    *
* Software Truth           softrue!kearns@uunet.uu.net *
********************************************************