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

// From N2235

constexpr int veryabs(int x) { return x < 0 ? -x : x; }

constexpr long long_max() { return 2147483647; }

constexpr int verysquare(int x) { return x * x; }