aboutsummaryrefslogtreecommitdiff
path: root/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp
blob: 7a1ba3e389babb5d8dd5cbdb83244c0e4e5acb60 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
// RUN: clang-cc -verify %s
// XFAIL: *

class A {
public:
  explicit A();
  
  explicit operator int(); // expected-warning {{explicit conversion functions are a C++0x extension}}

  explicit void f0(); // expected-error {{'explicit' cannot only be applied to constructor or conversion function}}
};

explicit A::A() { } // expected-error {{'explicit' cannot be specified outside class definition}}