gcc/testsuite/g++.dg/cpp1z/noexcept-type28.C
raw| 1 | // PR c++/113108 |
| 2 | // { dg-do compile { target c++17 } } |
| 3 | |
| 4 | template <typename T> |
| 5 | struct Foo { |
| 6 | Foo& operator=(Foo&&) = default; |
| 7 | T data; |
| 8 | }; |
| 9 | |
| 10 | template <typename T> |
| 11 | void consume(Foo<T>& (Foo<T>::*)(Foo<T>&&) ) {} |
| 12 | |
| 13 | template <typename T> |
| 14 | void consume(Foo<T>& (Foo<T>::*)(Foo<T>&&) noexcept) {} |
| 15 | |
| 16 | int main() { |
| 17 | consume(&Foo<int>::operator=); |
| 18 | } |