What is the difference between enum and shared immutable?

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Thu Oct 29 12:21:19 UTC 2020


On Thursday, 29 October 2020 at 08:13:42 UTC, Jan Hönig wrote:
> Regarding the shared keyword, I am not sure if immutables are 
> shared per default. I thought they are not.

You can test this with is(TYPE1==TYPE2)

is(shared(immutable(int))==immutable(int))



More information about the Digitalmars-d-learn mailing list