type to be tested
true if T represents a string that is subject to autodecoding
See Also: isNarrowString
1 static struct Stringish 2 { 3 string s; 4 alias s this; 5 } 6 static assert(isAutodecodableString!wstring); 7 static assert(isAutodecodableString!Stringish); 8 static assert(!isAutodecodableString!dstring); 9 10 enum E : const(char)[3] { X = "abc" } 11 enum F : const(char)[] { X = "abc" } 12 enum G : F { X = F.init } 13 14 static assert(isAutodecodableString!(char[])); 15 static assert(!isAutodecodableString!(E)); 16 static assert(isAutodecodableString!(F)); 17 static assert(isAutodecodableString!(G)); 18 19 struct Stringish2 20 { 21 Stringish s; 22 alias s this; 23 } 24 25 enum H : Stringish { X = Stringish() } 26 enum I : Stringish2 { X = Stringish2() } 27 28 static assert(isAutodecodableString!(H)); 29 static assert(isAutodecodableString!(I));
Detect whether type T is a string that will be autodecoded.
Given a type S that is one of:
Type T can be one of:
with the proviso that T cannot be a static array.