GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — learnmoderncpp-tutorial/modules/02-constexpr.cpp at main · cpp-tutor/learnmoderncpp-tutorial Expand file tree/ Copy path02-constexpr.cppMore file actions 18 lines (14 loc) · 479 Bytes / Copy path02-constexpr.cppFile metadata and controls18 lines (14 loc) · 479 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 // 02-constexpr.cpp : introducing the constexpr keyword import std; using namespace std; // Note: currently, not all compilers mark `acos` as a // constexpr function in cmath. The following line might // not compile with `clang++` for example. constexpr double PI1 = acos(-1.0); constexpr double PI2 = 22.0 / 7.0; static_assert(PI1 > 3.141 && PI1 < 3.143); static_assert(PI2 > 3.141 && PI2 < 3.143); int main() { println("PI1 = {}", PI1); println("PI2 = {}", PI2); } |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |