aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.6/gcc/testsuite/g++.dg/cpp0x/constexpr-function1.C
blob: c708b040f8065e21d049f15327e69f3038f39246 (plain)
1
2
3
4
5
6
7
8
9
10
// { dg-do compile }
// { dg-options "-std=gnu++0x" }

// 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; }