Bug 6314 – insertInPlace does not work for classes on dmd 2.054

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
Other
OS
Linux
Creation time
2011-07-14T05:35:00Z
Last change time
2011-09-17T04:19:02Z
Assigned to
nobody
Creator
mjdcc

Comments

Comment #0 by mjdcc — 2011-07-14T05:35:24Z
The following code: import std.array; class A {} void main() { A[] arr; arr.insertInPlace(0,new A); } fails to compile on dmd 2.054, with the following error: /usr/include/d/phobos/std/array.d(753): Error: template std.conv.emplace(T) if (!is(T == class)) does not match any function template declaration /usr/include/d/phobos/std/array.d(753): Error: template std.conv.emplace(T) if (!is(T == class)) cannot deduce template function from argument types !(A)(A*,A) /usr/include/d/phobosstd/array.d(753): Error: template instance errors instantiating template It worked for dmd 2.053.
Comment #1 by dmitry.olsh — 2011-09-17T04:19:02Z