Merge "Fix assert on saving settings"
[trojita.git] / cmake / FindCXXFeatures / cxx11-test-constexpr.cxx
blobed624512d8eeabdd6c379512f76854e76f037da3
1 constexpr int square(int x)
3 return x*x;
6 constexpr int the_answer()
8 return 42;
11 int main()
13 int test_arr[square(3)];
14 bool ret = (
15 (square(the_answer()) == 1764) &&
16 (sizeof(test_arr)/sizeof(test_arr[0]) == 9)
18 return ret ? 0 : 1;