Is there a way to make a struct without a distinction between constant, immutable, and mutable?

Liam McGillivray yoshi.pit.link.mario at gmail.com
Mon Nov 18 23:43:46 UTC 2024


I am doing work on the `units-d` library. This library contains 
some struct templates which don't contain any variables. Because 
of this, all instances are effectively constant. However, when 
they are placed as arguments in other templates, it causes 
problems when one is unexpectedly `const`.

Is there a way to make it so that this struct has only one 
qualifier? No distinction?


More information about the Digitalmars-d-learn mailing list