Thread overview
[Issue 10766] New: Variant does not accept pointers to incomplete (opaque) types
Aug 06, 2013
Ali Cehreli
Aug 06, 2013
Ali Cehreli
Sep 01, 2013
Manu
Sep 01, 2013
Manu
Sep 29, 2013
Kenji Hara
August 06, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10766

           Summary: Variant does not accept pointers to incomplete
                    (opaque) types
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody@puremagic.com
        ReportedBy: acehreli@yahoo.com


--- Comment #0 from Ali Cehreli <acehreli@yahoo.com> 2013-08-06 09:11:38 PDT ---
import std.stdio;
import std.variant;

struct S;

void main()
{
    S * p;
    auto v = Variant(p);
}

Error: struct deneme.S is forward referenced when looking for 'toHash'
Error: struct deneme.S is forward referenced when looking for 'toString'
Error: struct deneme.S unknown size
Error: struct deneme.S no size yet for forward reference
Error: struct deneme.S unknown size
Error: struct deneme.S no size yet for forward reference

Being a user of Variant, std.concurrency is affected when sending messages of pointers to opaque types.

Ali

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
August 06, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10766


Ali Cehreli <acehreli@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P3


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 01, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10766


Manu <turkeyman@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |turkeyman@gmail.com


--- Comment #1 from Manu <turkeyman@gmail.com> 2013-08-31 17:43:23 PDT ---
Same issue perhaps?


struct MyStruct;

MyStruct*[] arrayOfPointers;

arrayOfPointers ~= null; // fail
arrayOfPointers = new MyStruct*[n]; // also fail

Complains:
Error: struct MyStruct is forward referenced when looking for 'toHash'
Error: struct MyStruct is forward referenced when looking for 'opCmp'
Error: struct MyStruct is forward referenced when looking for 'toString'
Error: struct MyStruct unknown size
Error: struct MyStruct no size yet for forward reference
Error: struct MyStruct unknown size
Error: struct MyStruct no size yet for forward reference

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 01, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10766



--- Comment #2 from Manu <turkeyman@gmail.com> 2013-08-31 17:45:38 PDT ---
http://d.puremagic.com/issues/show_bug.cgi?id=10451

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 29, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10766


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


--- Comment #3 from Kenji Hara <k.hara.pg@gmail.com> 2013-09-28 23:02:28 PDT ---
*** This issue has been marked as a duplicate of issue 10451 ***

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