Mercurial > thymian
view 3rdparty/vmime/cmake/cmake-cxx11/Modules/CheckCXX11Features/cxx11-test-constexpr.cpp @ 0:a4671277546c tip
created the repository for the thymian project
| author | ferencd |
|---|---|
| date | Tue, 17 Aug 2021 11:19:54 +0200 |
| parents | |
| children |
line wrap: on
line source
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; }
