CRTP

Code



Compilation output:

/opt/compilers/dmd2/include/std/format.d(2610): Error: template instance formatObject!(LockingTextWriter, X, char) does not match template declaration formatObject(Writer, T, Char)(ref Writer w, ref T val, ref FormatSpec!Char f) if (hasToString!(T, Char)) /opt/compilers/dmd2/include/std/format.d(3047): Error: template instance std.format.formatValue!(LockingTextWriter, X, char) error instantiating /opt/compilers/dmd2/include/std/format.d(421): instantiated from here: formatGeneric!(LockingTextWriter, X, char) /opt/compilers/dmd2/include/std/stdio.d(808): instantiated from here: formattedWrite!(LockingTextWriter, char, X) /opt/compilers/dmd2/include/std/stdio.d(2083): instantiated from here: writefln!(char, X) /d858/f854.d(43): instantiated from here: writefln!(string, X) /opt/compilers/dmd2/include/std/format.d(421): Error: template instance std.format.formatGeneric!(LockingTextWriter, X, char) error instantiating /opt/compilers/dmd2/include/std/stdio.d(808): instantiated from here: formattedWrite!(LockingTextWriter, char, X) /opt/compilers/dmd2/include/std/stdio.d(2083): instantiated from here: writefln!(char, X) /d858/f854.d(43): instantiated from here: writefln!(string, X) /opt/compilers/dmd2/include/std/stdio.d(808): Error: template instance std.format.formattedWrite!(LockingTextWriter, char, X) error instantiating /opt/compilers/dmd2/include/std/stdio.d(2083): instantiated from here: writefln!(char, X) /d858/f854.d(43): instantiated from here: writefln!(string, X) /opt/compilers/dmd2/include/std/stdio.d(2083): Error: template instance std.stdio.File.writefln!(char, X) error instantiating /d858/f854.d(43): instantiated from here: writefln!(string, X) /d858/f854.d(43): Error: template instance std.stdio.writefln!(string, X) error instantiating /d858/f854.d(26): Error: incompatible types for (("objects_created: ") ~ (objects_created)): 'string' and 'int' /d858/f854.d(26): Error: incompatible types for (("objects_created: ") ~ (objects_created)): 'string' and 'int'

Paste info


Author: Guest
Views: 683
Private: no
Expires: Never
Uploaded: 05.02.14 10:54
Votes: 0

Compilation


Compiler: DMD 2.078.3 ( 2.078.3 )
Pointer size: m64

Actions