Thread overview
Is the following code legal?
Nov 08, 2016
Shachar Shemesh
Nov 08, 2016
Shachar Shemesh
Nov 08, 2016
Kagamin
Nov 09, 2016
Shachar Shemesh
Nov 09, 2016
Stefan Koch
Nov 09, 2016
Shachar Shemesh
November 08, 2016
SomeStruct[int] aa;

...

SomeStruct* aap = v in aa;
aa.remove(v);
writeln(aap);

November 08, 2016
On 08/11/16 14:58, Shachar Shemesh wrote:
> SomeStruct[int] aa;
>
> ...
>
> SomeStruct* aap = v in aa;
> aa.remove(v);
> writeln(aap);
>

That last line is, of course: "writeln(*aap);"

Shachar
November 08, 2016
On 11/8/16 7:58 AM, Shachar Shemesh wrote:
> SomeStruct[int] aa;
>
> ....
>
> SomeStruct* aap = v in aa;
> aa.remove(v);
> writeln(aap);
>

It currently will work. At some point in the past, this did NOT work, as we were proactively freeing the data.

I don't know if the policy is that this is officially supported or not. Hence, I don't know the answer to the question "is it legal".

-Steve
November 08, 2016
no
November 09, 2016
On 08/11/16 17:41, Kagamin wrote:
> no

Is this officially declared in the policy? Should I open an issue?

Shachar
November 09, 2016
On Wednesday, 9 November 2016 at 05:00:28 UTC, Shachar Shemesh wrote:
> On 08/11/16 17:41, Kagamin wrote:
>> no
>
> Is this officially declared in the policy? Should I open an issue?
>
> Shachar

Please open an issue.
November 09, 2016
On 09/11/16 07:02, Stefan Koch wrote:
> On Wednesday, 9 November 2016 at 05:00:28 UTC, Shachar Shemesh wrote:
>> On 08/11/16 17:41, Kagamin wrote:
>>> no
>>
>> Is this officially declared in the policy? Should I open an issue?
>>
>> Shachar
>
> Please open an issue.

Ask and thy shall receive.

https://issues.dlang.org/show_bug.cgi?id=16674