DIP69 - Implement scope for escape proof references
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Thu Dec 4 18:32:49 PST 2014
On 12/4/2014 4:48 PM, H. S. Teoh via Digitalmars-d wrote:
> Well, the "Expressions" section defines certain lifetimes to be
> infinity, however, it contradicts the definition of an rvalue's lifetime
> given under "Definitions" - "Lifetime", which states that an rvalue's
> lifetime lasts only to the end of the statement. This would imply that
> the following ought to be rejected:
>
> int x = 1 + 2; // lifetime(1 + 2) = end of statement
> // but lifetime(x) = infinity
>
> Sounds like the Definitions section is not precise enough. :-)
An 'int' is not a view!
More information about the Digitalmars-d
mailing list