https://d.puremagic.com/issues/show_bug.cgi?id=12000

           Summary: Forward reference issue with RefCounted
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Andrei Alexandrescu <[email protected]> 2014-01-25 18:37:19 
PST ---
Consider:

import std.typecons;

struct GroupBy(R)
{
    struct SharedInput
    {
        Group unused;
    }

    struct Group
    {
        private RefCounted!SharedInput _allGroups;
    }
}

unittest
{
    GroupBy!(int[]) g1;
}

This came about while I was working on #5968. The intent here is to have each
group have a backreference to the mother hen of all groups. However, the code
does not compile due to protests about forward reference issues (specifically
not knowing the size). It should, seeing as RefCounted is just a pointer so the
size is not needed to define Group's layout.

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

Reply via email to