summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/conversion/cond2.C
blob: d31de33e2750c91aca8c202a75d8a827e2442bb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// PR c++/10245

struct X {};
    
struct Y {
  Y ();
  operator X () const;
private:
  Y (const Y &);
};

Y y;
void foo() {
  X x = (1 ? Y() : Y());
}