diff options
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/static_assert16.C | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/static_assert16.C b/gcc/testsuite/g++.dg/cpp0x/static_assert16.C new file mode 100644 index 0000000..5b40b77 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/static_assert16.C @@ -0,0 +1,14 @@ +// PR c++/82239 +// { dg-do compile { target c++11 } } + +template<typename T> +struct C { + static constexpr int x = 5; + void f() + { + static_assert(0 < x, ""); + static_assert(0 < (x), ""); + static_assert(true || (0 < x), ""); + static_assert(true || (0 < (x)), ""); + } +}; |