1 // { dg-do compile { target c++11 } }
6 void foo (this S); // { dg-warning "explicit object member function only available with" "" { target c++20_down } }
7 template <int N, typename T>
8 static void bar (S, T);
9 template <int N, typename T>
10 void bar (this S, T); // { dg-warning "explicit object member function only available with" "" { target c++20_down } }
11 static void baz (const S &);
12 void baz (this const S &); // { dg-warning "explicit object member function only available with" "" { target c++20_down } }
21 S::foo (this S) // { dg-warning "explicit object member function only available with" "" { target c++20_down } }
25 template <int N, typename T>
31 template <int N, typename T>
33 S::bar (this S, T) // { dg-warning "explicit object member function only available with" "" { target c++20_down } }
43 S::baz (this const S &) // { dg-warning "explicit object member function only available with" "" { target c++20_down } }
56 // { dg-final { scan-assembler "_ZN1S3fooES_" } }
57 // { dg-final { scan-assembler "_ZNH1S3fooES_" } }
58 // { dg-final { scan-assembler "_ZN1S3barILi5EiEEvS_T0_" } }
59 // { dg-final { scan-assembler "_ZNH1S3barILi5EiEEvS_T0_" } }
60 // { dg-final { scan-assembler "_ZN1S3bazERKS_" } }
61 // { dg-final { scan-assembler "_ZNH1S3bazERKS_" } }