Taking a constant reference to a constant/non const object

helxi brucewayneshit at gmail.com
Wed Nov 15 09:04:50 UTC 2017


Hi. What function signature should I use for receiving a constant 
reference of an r/l value object? Is it auto fn(inout ref const 
myClass obj)?
I want to:
1. Take a constant reference of the object, not copy them
2. The object itself may be const or non const.


More information about the Digitalmars-d-learn mailing list