digitalmars.D.bugs - [Issue 20657] New: is() expression can't deal with tuples?
- d-bugmail puremagic.com (23/23) Mar 09 2020 https://issues.dlang.org/show_bug.cgi?id=20657
https://issues.dlang.org/show_bug.cgi?id=20657 Issue ID: 20657 Summary: is() expression can't deal with tuples? Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: turkeyman gmail.com alias XX = AliasSeq!(int, float); pragma(msg, is(XX == AliasSeq!(int, float))); // TRUE pragma(msg, is(XX == AliasSeq!(U, V), U, V)); // FALSE pragma(msg, is(XX == AliasSeq!(U), U...)); // FALSE Now it's clear why this is the case; inference like that won't apply to template instantiation arguments (but I reckon maybe it could?)... but is there some other way to do this? How do we determine if a thing is a tuple? I'm iterating `allMembers` of things, and trying to filter, but I can't work out how to detect if a symbol is a tuple so I can exclude it... --
Mar 09 2020