Debian Codegraph @

clang/test/PCH/implicitly-deleted.cpp

raw
1 // RUN: %clang_cc1 -std=c++11 -x c++-header %s -emit-pch -o %t.pch
2 // RUN: %clang_cc1 -std=c++11 -x c++ /dev/null -include-pch %t.pch
3
4 // RUN: %clang_cc1 -std=c++11 -x c++-header %s -emit-pch -fpch-instantiate-templates -o %t.pch
5 // RUN: %clang_cc1 -std=c++11 -x c++ /dev/null -include-pch %t.pch
6
7 class move_only { move_only(const move_only&) = delete; move_only(move_only&&); };
8 struct sb {
9 move_only il;
10 sb();
11 sb(sb &&);
12 };
13
14 template<typename T> T make();
15 template<typename T> void doit(decltype(T(make<const T&>()))*) { T(make<const T&>()); }
16 template<typename T> void doit(...) { T(make<T&&>()); }
17 template<typename T> void later() { doit<T>(0); }
18
19 void fn1() {
20 sb x;
21 later<sb>();
22 }