[Issue 5296] New: 2.50: std.conv.to!string() fails on char[ 256 ] buf

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Dec 1 04:38:16 PST 2010


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

           Summary: 2.50: std.conv.to!string() fails on char[ 256 ] buf
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: ah08010-d at yahoo.com


--- Comment #0 from Austin Hastings <ah08010-d at yahoo.com> 2010-12-01 04:36:46 PST ---
This code:
==========
module scratch;

import std.conv;

void main()
{
    char[ 256 ] buf;    
    auto s = to!string( buf );
}
==========
Produces this error. This appears to be 2.50 specific, since the code from
which this test case derives has been working for some time under .49
==========
$ dmd -run scratch.d
d:\Devel\D\dmd2\windows\bin\..\..\src\phobos\std\conv.d(95): Error: template
std.conv.toImpl(T,S) if (!implicitlyConverts!(S,T) && isSomeString!(T) &&
isInputRange!(Unqual!(S)) && isSomeChar!(ElementType!(S))) toImpl(T,S) if
(!implicitlyConverts!(S,T) && isSomeString!(T) && isInputRange!(Unqual!(S)) &&
isSomeChar!(ElementType!(S))) matches more than one template declaration,
d:\Devel\D\dmd2\windows\bin\..\..\src\phobos\std\conv.d(110):toImpl(T,S) if
(!implicitlyConverts!(S,T) && isSomeString!(T) && isInputRange!(Unqual!(S)) &&
isSomeChar!(ElementType!(S))) and
d:\Devel\D\dmd2\windows\bin\..\..\src\phobos\std\conv.d(220):toImpl(T,S)
if (isStaticArray!(S))
==========

It's worth noting that the error message is pretty much incomprehensible due to
the enormously long template conditions, and that it doesn't refer at all to
the original source line.

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


More information about the Digitalmars-d-bugs mailing list