Build error about LockingTextWriter

bioinfornatics bioinfornatics at fedoraproject.org
Sat Mar 3 09:00:30 PST 2012


Le samedi 03 mars 2012 à 07:38 -0800, Ali Çehreli a écrit :
> On 03/03/2012 06:11 AM, bioinfornatics wrote:
>  > Dear,
>  > i do not understand what is wrong in my code and produce this:
>  >
>  > -------------------------
>  > $ ldc2 ../../lib/libdscience-ldc.a -I=../.. fasta.d
>  > /usr/include/d/std/range.d(295): Error: static assert  "Cannot put a
>  > Sequence into a LockingTextWriter"
>  >      instantiatied in /usr/include/d/std/format.d(1512):
>  > put!(LockingTextWriter,Sequence)
>  >      instantiatied in /usr/include/d/std/format.d(1869):
>  > formatRange!(LockingTextWriter,Sequence,char)
>  >      instantiatied in /usr/include/d/std/format.d(2232):
>  > formatValue!(LockingTextWriter,Sequence,char)
>  >      ... (1 instantiations, -v to show) ...
>  >      instantiatied in /usr/include/d/std/stdio.d(684):
>  > formattedWrite!(LockingTextWriter,char,Sequence)
>  >      instantiatied in /usr/include/d/std/stdio.d(1563):
>  > write!(Sequence,char)
>  >      instantiatied in fasta.d(12): writeln!(Sequence)
>  > -------------------------
>  >
>  >
>  > sequence file can be show here:
>  > 
> https://gitorious.org/dscience/dscience/blobs/master/dscience/molecules/sequence.d
>  >
>  >
>  > thanks
>  >
> 
> Just by reading the code, LockingTextWriter can "put" only the dchar 
> type. This is from std.stdio:
> 
>          /// Range primitive implementations.
>          void put(A)(A writeme) if (is(ElementType!A : const(dchar)))
> // ...
>          void put(C)(C c) if (is(C : const(dchar)))
> 
> I haven't tried it myself, but changing the return type of 
> Sequence.front() to dchar would work.
> 
> Ali
> 

thanks ali i have try but no same error



More information about the Digitalmars-d-learn mailing list