summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept3.C
blob: 5a43899b5fa0950794df5a28cbb0b39c871b96cd (plain)
1
2
3
4
5
6
7
8
9
// { dg-do compile { target c++11 } }

constexpr int f(int i) { return i; }
#define SA(X) static_assert (X, #X)
/* We used to assert that the following *is* noexcept, but this has changed
   in c++/87603.  */
SA(!noexcept(f(42)));
int j;
SA(!noexcept(f(j)));