Thread overview | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
November 08, 2016 Is the following code legal? | ||||
---|---|---|---|---|
| ||||
SomeStruct[int] aa; ... SomeStruct* aap = v in aa; aa.remove(v); writeln(aap); |
November 08, 2016 Re: Is the following code legal? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Shachar Shemesh | 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 Re: Is the following code legal? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Shachar Shemesh | 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 Re: Is the following code legal? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Shachar Shemesh | no |
November 09, 2016 Re: Is the following code legal? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kagamin | 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 Re: Is the following code legal? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Shachar Shemesh | 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 Re: Is the following code legal? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stefan Koch | 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 |
Copyright © 1999-2021 by the D Language Foundation