Re: [sv-ec] parameterized class "::" operations and out-of-block declarations

From: Neil Korpusik <Neil.Korpusik_at_.....>
Date: Fri Nov 16 2007 - 15:49:48 PST
Hi Gord,

I am having trouble understanding one aspect of your example (the use of the
typedef). In the new proposed text there is the following statement.

    References to the default specialized type must use the explicit
    specialization form "#( )" with no actuals.

But then in the example you are using a typedef which does not use "#()".
The comment says that the typedef defines T to be the default
specialization. I am having a problem seeing how this is so.

   Example:
      class C #(int p = 1);
         static task t;
            int p;
            int x = C::p;  // C::p disambiguates p
                           // C::p is not p in the default specialization
         endtask
      endclass

      int x = C::p;    // illegal
      int y = C#()::p; // legal; refers to parameter p in default
                       // specialization of C
      typedef C T;
-->   int z = T::p;    // legal; the typedef defines T to be the default
                       // specialization so T::p refers to the p in the
                       // default specialization

Neil



Gordon Vreugdenhil wrote On 11/16/07 02:14 PM,:
> I've uploaded a proposal for Mantis 1857 that I believe captures
> the agreed upon behaviors from the last name resolution meeting.
> Please review asap and let me know if there are any substantive
> problems.
> 
> Gord.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Fri Nov 16 15:50:13 2007

This archive was generated by hypermail 2.1.8 : Fri Nov 16 2007 - 15:50:34 PST