On Sat, May 24, 2025 at 08:29:52PM +0000, Andy Valencia via Digitalmars-d-learn wrote: > The best I"ve come up with for a "static if" to see if something's an > array of ubyte: > > ```d > (isArray!(typeof(arg))) && is(typeof(arg).init[0] == ubyte) > ```
That's totally overkill. Just do this:
T[] myArray;
static if (is(typeof(myArray) == ubyte[])) {
...
}
That's all. Dead simple, no need to bring out the cannons when a
screwdriver will suffice.
--T
