D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6314 - insertInPlace does not work for classes on dmd 2.054
Summary: insertInPlace does not work for classes on dmd 2.054
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: Other Linux
: P2 regression
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-14 05:35 UTC by marcode
Modified: 2011-09-17 04:19 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description marcode 2011-07-14 05:35:24 UTC
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.