[libcxx-commits] [libcxx] linear_congruential_engine: add using more precision to prevent overflow (PR #81583)

via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 4 10:12:13 PST 2024


================
@@ -61,24 +61,33 @@ test()
   test1<T, A, 0, M>();
   test1<T, A, M - 2, M>();
   test1<T, A, M - 1, M>();
+}
+
+template <class T>
+void test_ext() {
+  const T M(static_cast<T>(-1));
 
-  /*
----------------
LRFLEW wrote:

You're right; that comment was from #81080, which is no longer entirely accurate. I went ahead and replaced it with a comment further down that more accurately describes what's not implemented,

https://github.com/llvm/llvm-project/pull/81583


More information about the libcxx-commits mailing list