aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/is_nothrow_convertible3.C
blob: 05b1e1d9ad9306a1c955a0e046da7d18fc0f0362 (plain)
1
2
3
4
5
6
7
8
9
// PR c++/106784
// { dg-do compile { target c++11 } }
// Make sure we don't reject this at runtime by trying to instantiate
// something that would be ill-formed.

struct A;
struct B { template<class T> B(const T&) noexcept { T::nonexistent; } };

static_assert(__is_nothrow_convertible(const A&, B), "");