http://d.puremagic.com/issues/show_bug.cgi?id=5889



--- Comment #11 from Kenji Hara <k.hara...@gmail.com> 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 <stdio.h>

struct S {};

int f(S&&){ return 1; }
int f(const S&){ return 2; }

int main()
{
  printf("%d\n", f(S()));
  return 0;
}
----

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

Reply via email to