summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-condition.C
blob: e2328fcc578ada8d901c52b97a73fa74dc01c23d (plain)
1
2
3
4
5
6
7
8
9
// { dg-options -std=c++0x }
// Core DR 948

constexpr int something() { return 3; }

int main() {
  if (constexpr long v = something()) {}
  if (static long v = something()) { } // { dg-error "decl-specifier invalid" }
}