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
This commit is contained in:
Jason Merrill 2003-03-21 02:13:53 -05:00
parent c77e059777
commit 2196cf1346

View file

@ -0,0 +1,12 @@
// 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);
}