Commit ff77a441 by Jason Merrill

re PR c++/10245 (?: operator requires public copy constructor of return type)

        PR c++/10245
        * cvt.c (force_rvalue): New fn.
        * call.c (build_conditional_expr): Use it.
        * cp-tree.h: Declare it.

[[Split portion of a mixed commit.]]

From-SVN: r65006.2
parent f7b9026e
// PR c++/10245
struct X {};
struct Y {
Y ();
operator X () const;
private:
Y (const Y &);
};
Y y;
void foo() {
X x = (1 ? Y() : Y());
}
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