How do I generate `setX` methods for all private mutable variables in a class?

Basile B. b2.temp at gmx.com
Tue Jun 6 22:53:54 UTC 2023


On Tuesday, 6 June 2023 at 21:49:58 UTC, Ki Rill wrote:
> On Monday, 5 June 2023 at 18:54:30 UTC, cc wrote:
>> [...]
>
> Is there a way to check for mutability as well? I have both 
> immutable and mutable fields. I would like to generate setters 
> for mutable fields only.

that's why a user attribute on the field is somewhat better than 
very complex introspection. It justs tells you "for that member 
do that".


More information about the Digitalmars-d-learn mailing list