[Issue 14222] New: emplace implicit dynamic to static array fails
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Feb 24 10:55:37 PST 2015
https://issues.dlang.org/show_bug.cgi?id=14222
Issue ID: 14222
Summary: emplace implicit dynamic to static array fails
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: Phobos
Assignee: nobody at puremagic.com
Reporter: john.loughran.colvin at gmail.com
struct S
{
this(int[3] a){}
}
unittest
{
auto s0 = S([1,2,3]); //OK
import std.conv : emplace;
auto s1 = emplace!S(&s0, [1,2,3]); //Error
}
std/conv.d(4067): Error: static assert "S cannot be emplaced from (int[])."
std/conv.d(4132): instantiated from here: emplaceImpl!(int[])
emplaceTest.d(10): instantiated from here: emplace!(S, int[])
--
More information about the Digitalmars-d-bugs
mailing list