gcc/testsuite/g++.dg/ext/is_convertible3.C
raw| 1 | // PR c++/106784 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | // Make sure we don't reject this at runtime by trying to instantiate |
| 4 | // something that would be ill-formed. |
| 5 | |
| 6 | struct A; |
| 7 | struct B { template<class T> B(const T&) noexcept { T::nonexistent; } }; |
| 8 | |
| 9 | static_assert(__is_convertible(const A&, B), ""); |