D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 5296 - 2.50: std.conv.to!string() fails on char[ 256 ] buf
Summary: 2.50: std.conv.to!string() fails on char[ 256 ] buf
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P2 normal
Assignee: Andrei Alexandrescu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-01 04:36 UTC by Austin Hastings
Modified: 2012-05-12 06:45 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Austin Hastings 2010-12-01 04:36:46 UTC
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.
Comment 1 SomeDude 2012-04-22 09:23:38 UTC
Compiles fine under 2.059