www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - build problem with xfbuild

reply Richard Webb <webby beardmouse.org.uk> writes:
If i try to use DMD 2.047 and xfbuild to compile a file which just contains

module arraytest;
import std.array;

I get the error:

F:\development\DTesting\dmd2\windows\bin\..\..\src\phobos\std\format.d(1882):
Error: template std.array.Appender!(string).Appender.put(U) if
(isImplicitlyConvertible!(U,T) || isSomeChar!(T) && isSomeChar!(U)) does not
match any function template declaration


F:\development\DTesting\dmd2\windows\bin\..\..\src\phobos\std\format.d(1882):
Error: template std.array.Appender!(string).Appender.put(U) if
(isImplicitlyConvertible!(U,T) || isSomeChar!(T) && isSomeChar!(U)) cannot
deduce template function from argument types !()(char[])


I don't have a simple repro just using DMD, but the error seems to originate
from line 695 of array.d (at least, commenting it out or changing it to

       put!(Unqual!T[])(encoded[0 .. len]);

allows it to compile.
Anyone got any ideas?

Thanks,
Richard Webb
Jun 10 2010
next sibling parent Trass3r <un known.com> writes:
I also had this error along with some strange sqrt can't be evaluated at  
compile-time stuff.

Compiling manually works fine, but xfbuild also passes all phobos files to  
dmd while building. So there probably is some strange bug if you pass the  
files that way.
Jun 10 2010
prev sibling parent torhu <no spam.invalid> writes:
On 11.06.2010 00:46, Richard Webb wrote:
 If i try to use DMD 2.047 and xfbuild to compile a file which just contains

 module arraytest;
 import std.array;

 I get the error:

 F:\development\DTesting\dmd2\windows\bin\..\..\src\phobos\std\format.d(1882):
 Error: template std.array.Appender!(string).Appender.put(U) if
 (isImplicitlyConvertible!(U,T) || isSomeChar!(T)&&  isSomeChar!(U)) does not
 match any function template declaration


 F:\development\DTesting\dmd2\windows\bin\..\..\src\phobos\std\format.d(1882):
 Error: template std.array.Appender!(string).Appender.put(U) if
 (isImplicitlyConvertible!(U,T) || isSomeChar!(T)&&  isSomeChar!(U)) cannot
 deduce template function from argument types !()(char[])
Try excluding phobos from the build with +xstd +xcore, at least the first one.
Jun 10 2010