diff --git a/gcc/testsuite/g++.dg/cpp0x/static_assert18.C b/gcc/testsuite/g++.dg/cpp0x/static_assert18.C new file mode 100644 index 00000000000..d38dbf40781 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/static_assert18.C @@ -0,0 +1,28 @@ +// PR c++/124389 +// { dg-do compile { target c++11 } } + +template struct Empty {}; + +template +constexpr bool test(T) noexcept { return true; } + +template +struct always_true { + static constexpr bool value = true; + static_assert(test(Empty{}), "BUG"); +}; + +template +struct AAA { + template ::value> + AAA(U) {} +}; + +template )> +void test_function() { + auto r = U(AAA(1)); +} + +int main() { + return 0; +}