Bug 12866 – Append to std.container.Array of fixed size arrays

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2014-06-06T15:15:39Z
Last change time
2018-01-05T13:29:13Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2014-06-06T15:15:39Z
void main() { import std.container: Array; alias V3 = int[3]; V3 v = [1, 2, 3]; Array!V3 arr; arr ~= v; } DMD 2.066alpha gives: ...\dmd2\windows\bin\..\..\src\phobos\std\container.d(2890): Error: template std.container.Array!(int[3]).Array.insertBack cannot deduce function from argument types !()(int[]), candidates are: ...\dmd2\windows\bin\..\..\src\phobos\std\container.d(2960): std.container.Array!(int[3]).Array.insertBack(Stuff)(Stuff stuff) if (isImplicitlyConvertible!(Stuff, T) || isInputRange!Stuff && isImplicitlyConvertible!(ElementType!Stuff, T)) temp.d(6): Error: template instance std.container.Array!(int[3]).Array.opOpAssign!("~", int[3]) error instantiating
Comment #1 by github-bugzilla — 2017-06-26T22:41:44Z
Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/7c217521979df28deb23517a90c7a3c9aba970b6 Fix Issue 12866 - concatenating to std.container.array of static arrays https://github.com/dlang/phobos/commit/8f98afc9ae8fba931bbe52b5c7ed23f8bc8180c4 Merge pull request #5473 from dmarquant/bug12866 Issue 12866: Allows concatenating of std.container.array with static arrays as T. merged-on-behalf-of: Petar Kirov <[email protected]>
Comment #2 by github-bugzilla — 2017-08-16T13:22:51Z
Commits pushed to stable at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/7c217521979df28deb23517a90c7a3c9aba970b6 Fix Issue 12866 - concatenating to std.container.array of static arrays https://github.com/dlang/phobos/commit/8f98afc9ae8fba931bbe52b5c7ed23f8bc8180c4 Merge pull request #5473 from dmarquant/bug12866
Comment #3 by github-bugzilla — 2018-01-05T13:29:13Z
Commits pushed to dmd-cxx at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/7c217521979df28deb23517a90c7a3c9aba970b6 Fix Issue 12866 - concatenating to std.container.array of static arrays https://github.com/dlang/phobos/commit/8f98afc9ae8fba931bbe52b5c7ed23f8bc8180c4 Merge pull request #5473 from dmarquant/bug12866