PR c++/84596 * constexpr.c (require_rvalue_constant_expression): New function. * cp-tree.h: Declare it. * semantics.c (finish_static_assert): Use it instead of require_potential_rvalue_constant_expression. * g++.dg/cpp0x/static_assert14.C: New test. From-SVN: r258107
8 lines
161 B
C
8 lines
161 B
C
// PR c++/84596
|
|
// { dg-do compile { target c++11 } }
|
|
|
|
template<int x>
|
|
void b(int c) {
|
|
static_assert (c, "c"); // { dg-error "non-constant|not a constant" }
|
|
}
|