[Issue 12791] .tupleof does not take base class fields into account

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri May 23 08:58:40 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=12791

Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Andrej Mitrovic <andrej.mitrovich at gmail.com> ---
Nevermind, just saw the docs:

-----
The .tupleof property returns an $(I ExpressionTuple)
of all the fields in the class, excluding the hidden fields and the
fields in the base class.
-----

It's a shame because it makes deep object copying more complicated than a
simple one-liner. Perhaps we could use some kind of Phobos helper template to
implement deep-dup-ing.

--


More information about the Digitalmars-d-bugs mailing list