This was discussed at some point though I don't recall if it was through the reflector buried in the wider discussion or just in a meeting. It certainly wasn't specified in the LRM. My recollection was that Mark and I agreed that it would be legal to have a forward specialization as in your example. I think that there was some disagreement as to whether the implicit default specialization using just the name should be allowed. Example: typedef class c; typedef c d; class c #(parameter p = 0); endclass I was somewhat opposed to considering this as legal although it is more symmetric to allow it. My argument against is mostly one of readability in terms of intent for a forward type "c#()" used as a forward is more obvious as to intent. Gord. Francoise Martinolle wrote: > Can you create a class specialization of a class for which we only have > a forward typedefs? > > Is this allowed? > > > typedef class c; > > typedef c#(1) c_1; > > class c #(parameter p = 0); > endclass > > In mantis 2211, we discussed the usage of :: for incomplete typedefs and > we speicifed the > > following text: > > > A forward typedef shall be considered incomplete prior to the final type > definition. While incomplete forward > > types, type parameters, and types defined by an interface based typedef > may resolve to class types, use > > of the class scope resolution operator (see 8.22) to select a type with > such a prefix shall be restricted to a > > typedef declaration. It shall be an error if the prefix does not resolve > to a class. > > Example: > > * * > > *typedef *C; > > C::T x; // illegal; C is an incomplete forward type > > typedef C::T c_t; // legal; reference to C::T is made by a typedef > > c_t y; > > * * > > *class *C; > > * * > > *typedef *int T; > > * * > > *endclass* > > > -- > This message has been scanned for viruses and > dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is > believed to be clean. -- -------------------------------------------------------------------- Gordon Vreugdenhil 503-685-0808 Model Technology (Mentor Graphics) gordonv@model.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Thu Nov 20 16:39:51 2008
This archive was generated by hypermail 2.1.8 : Thu Nov 20 2008 - 16:40:20 PST