[Issue 20657] New: is() expression can't deal with tuples?
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Mon Mar  9 23:12:29 UTC 2020
    
    
  
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 at puremagic.com
          Reporter: turkeyman at 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...
--
    
    
More information about the Digitalmars-d-bugs
mailing list