How to reliably detect an alias sequence?

Max Samukha maxsamukha at gmail.com
Mon Dec 28 07:13:32 UTC 2020


On Sunday, 27 December 2020 at 18:25:10 UTC, sighoya wrote:
>
> This should work:
> ```
> static assert(is(int == AliasSeq!int));
> Drepl: static assert:  `is(int == (int))` is false
> ```
>

That will only work for type tuples. We need a general solution 
that would work for any alias tuple.

> The most appropriate solution would be:
> ```
> AliasSeq!int.stringof == (int);
> ```
>
> But it wouldn't exclude false positives

Yes, stringof is inadequate.




More information about the Digitalmars-d-learn mailing list