aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/explicit4.C
blob: 663878e55a88e2b384e01445904ce9b2f66e32c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Negative explicit conv test.
// { dg-do compile { target c++11 } }

struct A {
  A(const A&, int = 0);		// { dg-message "note" }
};
struct B
{
  explicit operator A();
};

int main()
{
  B b;
  (A(b));			// OK
  (A(b,1));			// { dg-error "no match" }
  // { dg-message "candidate" "candidate note" { target *-*-* } 16 }
}