c++: Instantiate less when evaluating __is_convertible
[official-gcc.git] / gcc / testsuite / g++.dg / ext / is_nothrow_convertible3.C
blob05b1e1d9ad9306a1c955a0e046da7d18fc0f0362
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.
6 struct A;
7 struct B { template<class T> B(const T&) noexcept { T::nonexistent; } };
9 static_assert(__is_nothrow_convertible(const A&, B), "");