aboutsummaryrefslogtreecommitdiff
path: root/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp
blob: 16a09d836d16b819d0352e91611a55bb0776abe6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
// RUN: %clang_cc1 -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}}