Pass enum variable as const ref arg

rikki cattermole rikki at cattermole.co.nz
Fri Dec 4 14:06:32 UTC 2020


On 05/12/2020 2:42 AM, Andrey wrote:
> Hm, you mean that enum variable is not a real variable?

It is not a variable. It is a constant that cannot be changed and does 
not exist in the executable.

> I thought that to make CT variable you should mark it as enum (in c++ as 
> constexpr).
> How to do it here?

You are already doing it. This is not what you want. You want a variable 
that will pass by ref. Remove enum.


More information about the Digitalmars-d-learn mailing list