cmake/c++11-test-constexpr-N2235.cpp@baa35b4b67dc
cmake/c++11-test-constexpr-N2235.cpp
Fri, 23 Aug 2013 00:54:31 +0300
- author
- Santeri Piippo <crimsondusk64@gmail.com>
- date
- Fri, 23 Aug 2013 00:54:31 +0300
- changeset 476
- baa35b4b67dc
- parent 473
-
2a84149fe642
- permissions
- -rw-r--r--
fixed: front and back camera wouldn't render anything
constexpr int square(int x)
{
return x*x;
}
constexpr int the_answer()
{
return 42;
}
int main()
{
int test_arr[square(3)];
bool ret = (
(square(the_answer()) == 1764) &&
(sizeof(test_arr)/sizeof(test_arr[0]) == 9)
);
return ret ? 0 : 1;
}