diff options
author | Marek Polacek <polacek@redhat.com> | 2020-10-20 10:15:41 -0400 |
---|---|---|
committer | Marek Polacek <polacek@redhat.com> | 2020-10-20 10:16:12 -0400 |
commit | 953277ba3fa39a9285cf89f59932b0169e7f6b9d (patch) | |
tree | 25c27dd1a8df4249533e3b21f51698b542910903 | |
parent | 5bcd7de6402595fcaefcf1305e053fcb47dfc424 (diff) | |
download | gcc-953277ba3fa39a9285cf89f59932b0169e7f6b9d.zip gcc-953277ba3fa39a9285cf89f59932b0169e7f6b9d.tar.gz gcc-953277ba3fa39a9285cf89f59932b0169e7f6b9d.tar.bz2 |
c++: Add fixed test [PR82239]
This test was fixed by r256550 but that commit was fixing another issue,
and just happened to fix this too.
gcc/testsuite/ChangeLog:
PR c++/82239
* g++.dg/cpp0x/static_assert16.C: New test.
-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)), ""); + } +}; |