const-correct structs, best practices?

Dicebot via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Aug 21 09:22:08 PDT 2015


On Friday, 21 August 2015 at 15:00:04 UTC, Nick Sabalausky wrote:
> Is there a good posting somewhere that summarizes the current 
> best practices for making const-correct (ie works for all of 
> mutable/const/immutable) structs?

- mark methods const
- avoid reference type fields

;)


More information about the Digitalmars-d-learn mailing list