Make const, immutable, inout, and shared illegal as function attributes on the left-hand side of a function
Dicebot via Digitalmars-d
digitalmars-d at puremagic.com
Sat Oct 11 05:45:39 PDT 2014
On Saturday, 11 October 2014 at 07:36:21 UTC, monarch_dodra wrote:
>> Wait what? Are you saying there is a single case when this:
>>
>> const T var;
>>
>> is not identical to this:
>>
>> const(T) var;
>
> No, look at the pointer symbol.
module test;
const int** a;
const(int**) b;
**a = 42;
Error: cannot modify const expression **a
0000000000000000 B _D4test1axPPi
0000000000000008 B _D4test1bxPPi
???
Can you give an examle of the code that actually observes the
semantical difference?
More information about the Digitalmars-d
mailing list