diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/constexpr-59937-2.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/constexpr-59937-2.C | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-59937-2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-59937-2.C new file mode 100644 index 0000000000..e67d9467a4 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-59937-2.C @@ -0,0 +1,12 @@ +// PR c++/59937 +// { dg-do compile { target c++11 } } + +template<typename T> constexpr bool truth(const T&) { return true; } + +template<typename T> +void test() +{ + int i[1]; + constexpr bool untrue = !truth(i); + static_assert(!untrue, ""); +} |