How to Unqual an array?

James Blachly james.blachly at gmail.com
Sat Nov 16 14:48:04 UTC 2019


I am trying to write templated code that will take a character array -- 
mutable, const, or immutable (string).


static assert(is(Unqual!(const char) == char));

(Succeeds)

static assert(is(Unqual!(const(char)[]) == char[]));

Error: static assert:  `is(const(char)[] == char[])` is false


Is the template trying to strip the qualifier from the [] rather than 
the char?


More information about the Digitalmars-d-learn mailing list