Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
July 05, 2017 [Issue 14222] emplace implicit dynamic to static array fails | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14222 Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dlang-bugzilla@thecybershad | |ow.net -- |
July 05, 2017 [Issue 14222] emplace implicit dynamic to static array fails | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14222 Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|dlang-bugzilla@thecybershad | |ow.net | -- |
December 17, 2022 [Issue 14222] emplace implicit dynamic to static array fails | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14222 Iain Buclaw <ibuclaw@gdcproject.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P1 |P3 -- |
October 03 [Issue 14222] emplace implicit dynamic to static array fails | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14222 Paul Backus <snarwin+bugzilla@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |snarwin+bugzilla@gmail.com --- Comment #1 from Paul Backus <snarwin+bugzilla@gmail.com> --- I'm pretty sure this is impossible. IFTI always infers parameter types from argument types, not the other way around. The best workaround is probably to use std.array.staticArray to convert the array literal to the correct type: --- struct S { this(int[3] a){} } unittest { auto s0 = S([1,2,3]); //OK import std.conv : emplace; import std.array : staticArray; auto s1 = emplace!S(&s0, staticArray([1,2,3])); //OK } --- -- |
December 01 [Issue 14222] emplace implicit dynamic to static array fails | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14222 --- Comment #2 from dlangBugzillaToGithub <robert.schadek@posteo.de> --- THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/9654 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB -- |
Copyright © 1999-2021 by the D Language Foundation