[libcxx-commits] [libcxx] [libc++] Add input validation for set_intersection() in debug mode. (PR #101508)

Alexander Kornienko via libcxx-commits libcxx-commits at lists.llvm.org
Fri Aug 2 05:48:11 PDT 2024


================
@@ -43,33 +43,32 @@
 
 #include "test_iterators.h"
 
-namespace {
-
-// __debug_less will perform an additional comparison in an assertion
-static constexpr unsigned std_less_comparison_count_multiplier() noexcept {
-#if _LIBCPP_HARDENING_MODE == _LIBCPP_HARDENING_MODE_DEBUG
-  return 2;
+// debug mode provides no complexity guarantees, testing them would be a waste of effort
----------------
alexfh wrote:

nit: Please you use proper capitalization and punctuation in the comment. https://llvm.org/docs/CodingStandards.html#commenting

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


More information about the libcxx-commits mailing list