I don't understand the distinction you are trying to make between 'forward typedef' and 'empty typedef'. I think the different terms just describe different aspects of it. One aspect is not containing the details of the declaration, it is 'empty'. The other aspect is its being used before the detailed declaration, that is the 'forward' aspect. Shalom > -----Original Message----- > From: owner-sv-ec@server.eda.org [mailto:owner-sv-ec@server.eda.org] > On Behalf Of Neil Korpusik > Sent: Sunday, April 29, 2007 4:32 AM > To: sv-ec@server.eda.org > Cc: Mehdi Mohtashemi > Subject: [sv-ec] E-mail Vote (part 2) - mantis 1500 > > <resend - majordomo gagged on it the first time> > > 1500 ___ Yes _X_ No > > I think I know what you are getting at, but the distinction between a > "forward > typedef" and an "empty typedef" needs to be made more clear before we > can approve this mantis item. The biggest question appears to be; what > is a > forward typedef? > > a. "Forward typedef" versus "empty typedef" > > Both of these terms are used in sub-clause 4.9 and 7.24. > > The following text is in sub-clause 4.9. I assume that you aren't > suggesting > that this example is now illegal. The example shows two typedefs > for the > same user-defined type (i.e. foo). The text doesn't mention > anything about > a requirement for two typedefs for an "empty typedef" and there is > only > one example. > > A type can be used before it is defined, provided it is first > identified > as a type by an empty typedef: > > typedef foo; // is this a forward typedef or just an empty > typedef? > foo f = 1; > typedef int foo; // a second typedef for foo > > Mantis 1500 wants to make the following illegal? > > typedef foo; // I assume this is what you mean by forward > typedef > foo f = 1; > int foo; // error - missing typedef - forward typedef > only > // allowed for classes > > Later in sub-clause 4.9 there is the following text. Here it > refers to > the example in 7.24 as using an "empty typedef". > > While an empty user-defined type declaration is useful for > coupled > definitions of classes as shown in 7.24, it cannot be used > for... > > In sub-clause 7.24 the following example is shown: > > typedef class C2; // C2 is declared to be of type class > class C1; > C2 c; > endclass > class C2; > C1 c; > endclass > > The text in sub-clause 7.24 goes on to say that this example is > the > same as this. Note that this version uses an empty typedef: > > typedef C2; // both an empty typedef and a forward typedef? > class C1; > C2 c; > endclass > class C2; // no typedef required > C1 c; > endclass > > b. Friendly amendment > > The text that you are quoting from sub-clause 4.9 contains the > following > text. > > From: > ... it cannot be used ... > To: > ... it shall not be used ... > > c. Friendly amendment > > From: > ... to declare an instance of a class ... > To: > ... to declare a handle to an instance of a class ... > > > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Sat Apr 28 23:11:02 2007
This archive was generated by hypermail 2.1.8 : Sat Apr 28 2007 - 23:11:19 PDT