[Issue 5988] Error when template is instantiated in a class

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu May 12 19:39:50 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5988


kennytm at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kennytm at gmail.com


--- Comment #2 from kennytm at gmail.com 2011-05-12 19:35:48 PDT ---
This is because that class template is actually

    template C(T) {
      class C {
        <declarations>
      }
    }

so the C inside is referring to the class C, not the template C. This code
works:

    class C(T) {
      Templ!(.C) foo;
    }

I don't know why uncomment the global instantiation makes the problem goes
away.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list