Bug 1814798 - pt 1. Add bool to enable/disable PHC at runtime r=glandium
[gecko.git] / build / clang-plugin / tests / TestNoExplicitMoveConstructor.cpp
blob5aea6b1a7f4718979a97de073e36b46250cefdca
1 class Foo {
2 Foo(Foo&& f);
3 };
5 class Bar {
6 explicit Bar(Bar&& f); // expected-error {{Move constructors may not be marked explicit}}
7 };
9 class Baz {
10 template<typename T>
11 explicit Baz(T&& f) {};
14 class Quxx {
15 Quxx();
16 Quxx(Quxx& q) = delete;
17 template<typename T>
18 explicit Quxx(T&& f) {};
21 void f() {
22 // Move a quxx into a quxx! (This speciailizes Quxx's constructor to look like
23 // a move constructor - to make sure it doesn't trigger)
24 Quxx(Quxx());