no size yet for forward reference error
Jonathan M Davis via Digitalmars-d
digitalmars-d at puremagic.com
Thu Feb 25 09:33:34 PST 2016
On Thursday, 25 February 2016 at 04:23:52 UTC, Erik Smith wrote:
> Here's a better reduction of the problem. Commenting out
> either of the lines marked HERE eliminates the error. It's
> some kind of interaction with templates, RefCounted, and the
> cross referencing types.
>
> erik
>
>
> module database;
> import std.typecons;
>
> unittest {
> auto con = Connection!int();
> }
>
> struct Connection(T) {
> alias Statement = .Statement!T; // HERE
> }
>
> struct Statement(T) {
> alias Connection = .Connection!T;
>
> private:
>
> struct Payload {
> Connection con;
> this(Connection con_) {con = con_;}
> }
>
> alias RefCounted!(Payload, RefCountedAutoInitialize.no)
> Data;
> Data data_; // HERE
> }
Actually, both of your examples compile for me - both with master
and with 2.070.0. I'm running on x86_64 FreeBSD (which you
probably aren't), which shouldn't matter for this sort of error,
but I suppose that it's possible that it's somehow
system-specific, much as I wouldn't expect it to be. So, I don't
what to say. :|
- Jonathan M Davis
More information about the Digitalmars-d
mailing list