On Wednesday, 14 July 2021 at 06:28:37 UTC, jfondren wrote:
alternate 1:
- pull tests out into a named enum template, like std.traits
- always static assert enum, rather than conditionally
asserting false
- always have the rest of the code
```d
enum isString(T) = is(T == string) || is(T == wstring) || is(T
== dstring);
// very similar to std.traits.isSomeString
struct gudtUGC(T) {
static assert(isString!T, "error message");
// unconditional structure code
}
```
... is it me or this isn't triggering the assert either ?