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.
15 lines
295 B
C
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)), "");
|
|
}
|
|
};
|