rvalue references

Manu turkeyman at gmail.com
Wed Apr 24 01:23:36 PDT 2013


On 24 April 2013 16:52, Walter Bright <newshound2 at digitalmars.com> wrote:

> On 4/23/2013 8:32 PM, Manu wrote:
>
>> Is it actually complicated?
>>
>
> It's a lot more complicated than simply destructing them at the end of a
> function. You have to define what happens for conditionally executed
> expressions || && ?:, what happens at the end of a statement, what happens
> at a }, what happens to for statement initializers, etc., for each
> statement type.
>
>
>
>  Enclosing scope seems fine too. Can you suggest a case where it could
>> escalate
>> to an outer scope via a scope-ref argument?
>> So let's say then, that lifetime should be identical to a local declared
>> in the
>> same location. No change of any rules is required, it will work as
>> expected.
>>
>
> You cannot declare locals in conditionally compiled expressions. So it
> isn't as simple as that.
>

Okay, I understand the problem now. I'm sure it's possible to address these
issues, but I see the complexity in that case.
Is it worth doing so? Will it be taken seriously, or will another reason to
dismiss it appear?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130424/e8af5148/attachment.html>


More information about the Digitalmars-d mailing list