On Mon, Sep 5, 2011 at 4:34 PM, Walter Bright <[email protected]> wrote:
>
>
> On 9/4/2011 10:54 PM, Jonathan M Davis wrote:
>>
>> It's a bug in dmd. string literals aren't lvalues
>
> Yes, they are, because one can take the address of them.
>
> What they are not are *modifiable* lvalues.

Is this really a useful distinction?  All you can do with const
lvalues is pass them by const ref, and string literals will need to be
special cased to be const only when required.  The same applies to
struct literals etc as well.  Why can't we just make all literals
rvalues and fix auto ref to fill in the holes?
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to