[Issue 1023] Struct implementing interfaces and struct member enumeration
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Tue May 15 13:30:08 UTC 2018
    
    
  
https://issues.dlang.org/show_bug.cgi?id=1023
Dmitry Olshansky <dmitry.olsh at gmail.com> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dmitry.olsh at gmail.com
         Resolution|---                         |WORKSFORME
--- Comment #8 from Dmitry Olshansky <dmitry.olsh at gmail.com> ---
> An enumeration of the methods of the
struct would also be nice.
__trait(getMembers, ...)
Far as duck typing goes, this may produce a DIP on compile-time interfaces
(a-la concepts).
And we have had good library solutions that check all of boxes for a long time
now, see:
https://github.com/atilaneves/concepts
Which has `models` UDA to check if struct follows interface statically.
--
    
    
More information about the Digitalmars-d-bugs
mailing list