[Issue 11889] std.container.Array.opIndex returns by value, resulting in perfect storm

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jan 10 00:50:25 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=11889


monarchdodra at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |monarchdodra at gmail.com


--- Comment #1 from monarchdodra at gmail.com 2014-01-10 00:50:19 PST ---
Is this really Array that is at fault here?

//----
struct S{int i;}
S s();
int i();

void main()
{
    s().i = 1; //YES.
    i() = 1;   //NO.
}
//----

If you can't assign to an rvalue, I question the ability to assign to an rvalue
member...

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list