Thread overview
[Issue 5296] New: 2.50: std.conv.to!string() fails on char[ 256 ] buf
Dec 01, 2010
Austin Hastings
Apr 22, 2012
SomeDude
December 01, 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@puremagic.com
        ReportedBy: ah08010-d@yahoo.com


--- Comment #0 from Austin Hastings <ah08010-d@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: -------
January 09, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5296


Andrei Alexandrescu <andrei@metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |andrei@metalanguage.com
         AssignedTo|nobody@puremagic.com        |andrei@metalanguage.com


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 22, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=5296


SomeDude <lovelydear@mailmetrash.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lovelydear@mailmetrash.com


--- Comment #1 from SomeDude <lovelydear@mailmetrash.com> 2012-04-22 09:23:38 PDT ---
Compiles fine under 2.059

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