Version: 10.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: namark at disroot dot org
Target Milestone: ---
I believe the following code should be valid, but gcc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87605
--- Comment #2 from namark ---
(In reply to Andrew Pinski from comment #1)
> Except A() is a temp so it cannot be a lvalue.
Not sure what you mean. As I understood 'a' is the lvalue, being converted to
an rvalue by the ternary. I'm not very good
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: namark at disroot dot org
Target Milestone: ---
The code below compiles and outputs "copy" to stdout when ran.
#include
struct A
{
A(){}
explicit A(const A&am