http://d.puremagic.com/issues/show_bug.cgi?id=5889
--- Comment #16 from Kenji Hara 2012-04-23 11:18:45 PDT
---
*** Issue 5769 has been marked as a duplicate of this issue. ***
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail be
http://d.puremagic.com/issues/show_bug.cgi?id=5889
Kenji Hara changed:
What|Removed |Added
CC||dsim...@yahoo.com
--- Comment #15 from Ke
http://d.puremagic.com/issues/show_bug.cgi?id=5889
Walter Bright changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|
/907c94de34b9d99438e7e244c556903224a0c094
Merge pull request #41 from 9rnsr/rvalue-struct-literal
Issue 5889 - Struct literal/construction should be rvalue
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
http://d.puremagic.com/issues/show_bug.cgi?id=5889
--- Comment #13 from yebblies 2012-01-31 14:36:09 EST ---
*** Issue 5178 has been marked as a duplicate of this issue. ***
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail becau
http://d.puremagic.com/issues/show_bug.cgi?id=5889
Kenji Hara changed:
What|Removed |Added
CC||and...@metalanguage.com
--- Comment #12 f
http://d.puremagic.com/issues/show_bug.cgi?id=5889
--- Comment #11 from Kenji Hara 2011-06-30 04:47:55 PDT
---
Another example.
In C++0x (gcc-4.5.1), following code prints "1".
It seems to me that the S() makes rvalue instead of lvalue.
#include
struct S {};
int f(S&&){ return 1; }
int
http://d.puremagic.com/issues/show_bug.cgi?id=5889
--- Comment #10 from Kenji Hara 2011-06-30 04:37:33 PDT
---
OK. Here's another advantage of that.
struct S1{ int n; }
struct S2{ this(int n){} }
struct S3{ int n; void opAssign(S3 rhs){} }
void main()
{
S1(0) = S1(0); // Line 7
http://d.puremagic.com/issues/show_bug.cgi?id=5889
Walter Bright changed:
What|Removed |Added
CC||bugzi...@digitalmars.com
--- Comment #
http://d.puremagic.com/issues/show_bug.cgi?id=5889
--- Comment #8 from Kenji Hara 2011-06-30 00:14:51 PDT ---
(In reply to comment #7)
> But that's true of immutable as well. In reality, any struct literal which
> exists at run time is stored in the executable as if it were immutable (just
> a
http://d.puremagic.com/issues/show_bug.cgi?id=5889
--- Comment #7 from Don 2011-06-29 23:28:22 PDT ---
(In reply to comment #6)
> (In reply to comment #5)
> 'Literal is rvalue' is very important semantics for strict typed languages.
> A literal is not referenced from any other places, so it is
http://d.puremagic.com/issues/show_bug.cgi?id=5889
--- Comment #6 from Kenji Hara 2011-06-29 18:11:03 PDT ---
(In reply to comment #5)
'Literal is rvalue' is very important semantics for strict typed languages.
A literal is not referenced from any other places, so it is _unique_ and
_thread_loc
http://d.puremagic.com/issues/show_bug.cgi?id=5889
Don changed:
What|Removed |Added
CC||clugd...@yahoo.com.au
--- Comment #5 from Don 2
http://d.puremagic.com/issues/show_bug.cgi?id=5889
--- Comment #4 from Kenji Hara 2011-06-24 04:52:32 PDT ---
bug4843 (and its duplication bug6201) is part of this issue.
FuncDeclaration::overloadResolve use TypeStruct::defaultInit, but it makes
lvalue.
So ref and non-ref overloads make ambigu
http://d.puremagic.com/issues/show_bug.cgi?id=5889
Kenji Hara changed:
What|Removed |Added
Depends on||3659
--- Comment #3 from Kenji Hara 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5889
kenn...@gmail.com changed:
What|Removed |Added
CC||kenn...@gmail.com
--- Comment #2 fr
http://d.puremagic.com/issues/show_bug.cgi?id=5889
--- Comment #1 from Kenji Hara 2011-04-29 21:27:14 PDT ---
Send pull request:
https://github.com/D-Programming-Language/dmd/pull/41
After pull requested, I thought this request may be too early to fix. This fix
may break some existing codes.
17 matches
Mail list logo