blob: 717ed1e3caf26a9701bad34bd0657e99f93ca9ce [file] [log] [blame]
Anders Carlsson7a6e13a2010-01-24 17:15:04 +00001// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s
2namespace Constructor {
3struct A {
4 A(int);
5};
6
7struct B {
8 explicit B(int);
9};
10
11B::B(int) { }
12
13struct C {
14 void f(const A&);
15 void f(const B&);
16};
17
18void f(C c) {
19 c.f(10);
20}
21}
22
23namespace Conversion {
24 struct A {
25 operator int();
26 explicit operator bool();
27 };
28
29 A::operator bool() { return false; }
30
31 struct B {
32 void f(int);
33 void f(bool);
34 };
35
36 void f(A a, B b) {
37 b.f(a);
38 }
39}