templates woes....

Code



Compilation output:

i = 0 name = a i = 1 name = b i = 2 name = c last one 2 "dict["c"] = c;" /home/c64/c811.d(28): Error: void has no value /home/c64/c811.d(27): Error: incompatible types for (("dict[\"" ~ nameOfFieldAt ~ "\"] = " ~ nameOfFieldAt ~ ";\x0a") ~ (dictStringImpl!(Foo,2LU))): 'string' and 'void' /home/c64/c811.d(28): Error: template instance c811.dictStringImpl!(Foo,1LU) error instantiating /home/c64/c811.d(14): instantiated from here: dictStringImpl!(Foo,0) /home/c64/c811.d(10): instantiated from here: dictString!(Foo) /home/c64/c811.d(14): Error: template instance c811.dictStringImpl!(Foo,0) error instantiating /home/c64/c811.d(10): instantiated from here: dictString!(Foo) /home/c64/c811.d(10): Error: template instance c811.dictString!(Foo) error instantiating /home/c64/c811.d(10): while evaluating pragma(msg, dictString!(Foo))

Paste info


Author: Guest
Views: 813
Private: no
Expires: Never
Uploaded: 11.10.12 16:34
Votes: 0

Compilation


Compiler: DMD 2.x Gi
Pointer size: m64