More magical AA semantics
deadalnix
deadalnix at gmail.com
Sat Jan 12 17:26:58 PST 2013
On Saturday, 12 January 2013 at 21:56:13 UTC, Andrei Alexandrescu
wrote:
> On 1/12/13 7:40 AM, Jonathan M Davis wrote:
>> On Saturday, January 12, 2013 13:30:47 monarch_dodra wrote:
>>> What about "++a[0]" when there is no a[0]? Is this something
>>> that
>>> will throw or not?
>>
>> Personally, I think that it should, but there's probably a
>> good chance that it
>> won't, because it's an lvalue. I don't know what will happen
>> with that though.
>> There are a lot of bugs right now related elements being
>> inserted into AAs
>> when they shouldn't be, so I really don't know how much
>> relation the current
>> behavior will have with the behavior that AAs will ultimately
>> have.
>
> ++a[0] should work.
>
Can you explain why ?
More information about the Digitalmars-d
mailing list