Revert "Reapply "[llvm-jitlink] Use concurrent linking by default." with fixes. ...
[llvm-project.git] / clang / test / CXX / temp / temp.fct.spec / temp.deduct / cwg1170.cpp
blob47184ec0345561688c78ceb85508fb1d735c2d43
1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
2 // expected-no-diagnostics
4 #if !__has_feature(cxx_access_control_sfinae)
5 # error No support for access control as part of SFINAE?
6 #endif
8 typedef char yes_type;
9 typedef char (&no_type)[2];
11 template<unsigned N> struct unsigned_c { };
13 template<typename T>
14 class has_copy_constructor {
15 static T t;
17 template<typename U> static yes_type check(unsigned_c<sizeof(U(t))> * = 0);
18 template<typename U> static no_type check(...);
20 public:
21 static const bool value = (sizeof(check<T>(0)) == sizeof(yes_type));
24 struct HasCopy { };
26 struct HasNonConstCopy {
27 HasNonConstCopy(HasNonConstCopy&);
30 struct HasDeletedCopy {
31 HasDeletedCopy(const HasDeletedCopy&) = delete;
34 struct HasPrivateCopy {
35 private:
36 HasPrivateCopy(const HasPrivateCopy&);
39 int check0[has_copy_constructor<HasCopy>::value? 1 : -1];
40 int check1[has_copy_constructor<HasNonConstCopy>::value? 1 : -1];
41 int check2[has_copy_constructor<HasDeletedCopy>::value? -1 : 1];
42 int check3[has_copy_constructor<HasPrivateCopy>::value? -1 : 1];