about summary refs log tree commit diff
path: root/lang/cpptour/static-ass.cc
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2021-02-28 17:25:57 +0700
committerNguyễn Gia Phong <mcsinyx@disroot.org>2021-02-28 17:25:57 +0700
commit67bb27e9f5beec4d8ca0a6c29f045d5f23d6f40f (patch)
treeb677228d71b638dd6e423b037311ef0913ba66e7 /lang/cpptour/static-ass.cc
parentee9b8fc921f48dc893808e1c9dbfbef321aa362c (diff)
downloadcp-67bb27e9f5beec4d8ca0a6c29f045d5f23d6f40f.tar.gz
[lang] Reorganize language learning archive
Diffstat (limited to 'lang/cpptour/static-ass.cc')
-rw-r--r--lang/cpptour/static-ass.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/lang/cpptour/static-ass.cc b/lang/cpptour/static-ass.cc
new file mode 100644
index 0000000..837a965
--- /dev/null
+++ b/lang/cpptour/static-ass.cc
@@ -0,0 +1,8 @@
+constexpr double C = 2999792.458;   // km/s
+
+int
+main ()
+{
+  constexpr double local_max = 160.0 / (60 * 60);
+  static_assert (local_max < C, "can't go that fast");
+}