www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6314] New: insertInPlace does not work for classes on dmd 2.054

http://d.puremagic.com/issues/show_bug.cgi?id=6314

           Summary: insertInPlace does not work for classes on dmd 2.054
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: regression
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: mjdcc clix.pt



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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 14 2011