CT-String as a Symbol

"Nordlöw" via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Apr 15 12:18:02 PDT 2015


On Wednesday, 15 April 2015 at 19:15:36 UTC, Nordlöw wrote:
> errors
>
> typecons_ex.d(135,5): Error: mixin 
> typecons_ex.IndexedBy!(int[3], "I").IndexedBy.genOps!"I" does 
> not match template declaration genOps(T)
> typecons_ex.d(152,12): Error: template instance 
> typecons_ex.IndexedBy!(int[3], "I") error instantiating
> typecons_ex.d(185,20):        instantiated from here: 
> indexedBy!("I", int[3])
> typecons_ex.d(202,9): Error: static assert  (!true) is false

Correction. This error is triggered if I put at the top of the 
defintion of IndexedBy(R, string I = "Index")

     mixin genOps!(mixin(I));

If I place after the definition of index struct I get another 
error

typecons_ex.d(143,19): Error: argument to mixin must be a string 
type, not I
typecons_ex.d(152,12): Error: template instance 
typecons_ex.IndexedBy!(int[3], "I") error instantiating
typecons_ex.d(185,20):        instantiated from here: 
indexedBy!("I", int[3])
typecons_ex.d(202,9): Error: static assert  (!true) is false

How is this possible?


More information about the Digitalmars-d-learn mailing list