[Issue 12000] New: Forward reference issue with RefCounted
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jan 25 18:37:24 PST 2014
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: nobody at puremagic.com
ReportedBy: andrei at erdani.com
--- Comment #0 from Andrei Alexandrescu <andrei at erdani.com> 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: -------
More information about the Digitalmars-d-bugs
mailing list