[Issue 6585] std.variant cannot handle shared arrays

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Apr 22 14:31:32 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=6585

jean-loup.tastet at epfl.ch changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jean-loup.tastet at epfl.ch
          Component|DMD                         |Phobos

--- Comment #1 from jean-loup.tastet at epfl.ch ---
This bug is still present in Phobos 2.065.0.
See: http://dpaste.dzfl.pl/79743d502b27

As pointed out by David, this seems to be caused by Variant trying to pass a
shared(double)* to the C function stdc.string.memcpy (btw, it is not specific
to double). The error message has now become more cryptic.

The same test case for Variant (http://dpaste.dzfl.pl/e0dcfdf241bb) now gives
(truncated output for DMD):
---
/usr/include/dlang/dmd/std/variant.d(585): Error: function
core.stdc.string.memcpy (void* s1, const(void*) s2, ulong n) is not callable
using argument types (ubyte[32]*, shared(double)*, ulong)
/usr/include/dlang/dmd/std/variant.d(427): Error: template instance
std.variant.VariantN!(32LU).VariantN.opAssign!(shared(double)) error
instantiating
---

--


More information about the Digitalmars-d-bugs mailing list