What is the proper way to outline static-if-conditions ?
chrehme at gmx.de
Sun Oct 10 15:39:32 UTC 2021
On Sunday, 10 October 2021 at 15:15:51 UTC, drug wrote:
> As I know it's impossible, but you can use a regular template:
> template isPointedStaticArray(T)
> static if (isPointer!T)
> enum isPointedStaticArray =
> enum isPointedStaticArray = false;
> this compiles from 2.086.1 and above
That's indeed close to pattern matching and is probably the best
answer :-) .
More information about the Digitalmars-d-learn