Commit 2196cf13 by Jason Merrill

re PR c++/9440 (error message about "non-lvalue in unary '&'" when using ?: operator)

        PR c++/9440
        * call.c (build_conditional_expr): Use convert rather than an
        explicit NOP_EXPR.

From-SVN: r64651
parent c77e0597
// PR c++/9440
struct A {
explicit A(int = 0);
A(const A&);
operator int() const;
};
A
bar(bool b, const A& a)
{
return (b ? A() : a);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment