Fix up r288457 for compilers that don't support noexcept function types:

disable the test entirely for those cases. This is a quick patch, I'll look at
a proper feature flag next.

llvm-svn: 288539
This commit is contained in:
Richard Smith 2016-12-02 21:43:36 +00:00
parent ffd5732170
commit cc2d21111d
2 changed files with 8 additions and 4 deletions

View File

@ -13,6 +13,7 @@
#include <cassert>
#ifdef __cpp_noexcept_function_type
template<bool Noexcept> void f() noexcept(Noexcept) {}
template<bool Noexcept> using FnType = void() noexcept(Noexcept);
@ -57,11 +58,12 @@ void check_deep() {
int main()
{
#ifdef __cpp_noexcept_function_type
check<false, false>();
check<false, true>();
check<true, false>();
check<true, true>();
check_deep();
#endif
}
#else
int main() {}
#endif

View File

@ -14,6 +14,7 @@
#include <cassert>
#ifdef __cpp_noexcept_function_type
struct X {
template<bool Noexcept> void f() noexcept(Noexcept) {}
};
@ -60,11 +61,12 @@ void check_deep() {
int main()
{
#ifdef __cpp_noexcept_function_type
check<false, false>();
check<false, true>();
check<true, false>();
check<true, true>();
check_deep();
#endif
}
#else
int main() {}
#endif