DConf Day 1 Panel with Walter Bright and Andrei Alexandrescu

Sönke Ludwig via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sat Jun 28 09:51:58 PDT 2014


Am 28.06.2014 05:33, schrieb Peter Alexander:
> On Saturday, 28 June 2014 at 02:46:25 UTC, safety0ff wrote:
>> On Saturday, 28 June 2014 at 02:02:28 UTC, Peter Alexander
>>> int a;
>>> const int b;
>>> immutable int c;
>>> foo(a);
>>> foo(b);
>>> foo(c);
>>>
>>> These all call foo!int
>>
>> Awesome, thanks!
>
> ... I just tried this and I'm wrong. The qualifier isn't stripped. Gah!
> Three different versions!
>
> I could have sworn D did this for primitive types. This makes me sad :-(

I *think* it does this if you define foo as "foo(T)(const(T) arg)", though.


More information about the Digitalmars-d-announce mailing list