8sa1-gcc/gcc/testsuite/g++.dg/cpp0x/static_assert16.C
Marek Polacek 953277ba3f 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.
2020-10-20 10:16:12 -04:00

15 lines
295 B
C

// 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)), "");
}
};