tupleof of class instance... but enumerate _all_ the instance variables

Ali Çehreli acehreli at yahoo.com
Sun Jun 29 04:06:43 UTC 2025


On 6/28/25 8:50 PM, Andy Valencia wrote:
 > On Saturday, 28 June 2025 at 10:41:47 UTC, Nick Treleaven wrote:
 >
 >>     static if (is(D Bases == super))
 >
 > Wow.  I can't find that in _any_ of my references on D...

Not this time. I have it here:

   https://ddili.org/ders/d.en/is_expr.html

Search for 'super' on that page.

 > including the
 > language spec itself.

It's the 'is expression' in the spec:

   https://dlang.org/spec/expression.html#is_expression

 > Nor in Phobos source... what is a "D Bases",

It's not "D Bases" but the is expression is written in this form:

   is ( Type Identifier == TypeSpecialization )

So, 'D' is Type; 'Bases' is Identifier, and 'super' is TypeSpecialization.

 > please?  Uncle!

All of that is described in not-very-human friendly language at the 
links above. :)

Ali



More information about the Digitalmars-d-learn mailing list