aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/elide7.C
blob: 2d8cc65bca8a0a03adfadf1597e5561839fe4c6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// DR2327: In direct-initialization, prefer a constructor even if it requires a
// qualification conversion.

// { dg-do compile { target c++11 } }

struct Dog;
struct Cat {
  Cat(const Dog&);
};
struct Dog {
  operator Cat() = delete;
};

Cat cat(Dog{});