[sv-ec] forward typedefs

From: Francoise Martinolle <fm_at_.....>
Date: Thu Nov 20 2008 - 15:55:39 PST
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, and is
believed to be clean.
Received on Thu Nov 20 15:57:01 2008

This archive was generated by hypermail 2.1.8 : Thu Nov 20 2008 - 15:57:42 PST