[clang-tools-extra] [clang-tidy][NFC][doc] mention some range algorithms do not work for `vector<bool>` in C++20 (PR #120774)

Congcong Cai via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 20 09:01:37 PST 2024


https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/120774

None

>From b8f686aa8fa45ab50c45c16d6b4eeea99de64bcb Mon Sep 17 00:00:00 2001
From: Congcong Cai <congcongcai0907 at 163.com>
Date: Sat, 21 Dec 2024 01:01:14 +0800
Subject: [PATCH] [clang-tidy][NFC][doc] mention some range algorithms do not
 work for `vector<bool>` in C++20

---
 .../docs/clang-tidy/checks/modernize/use-ranges.rst            | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/clang-tools-extra/docs/clang-tidy/checks/modernize/use-ranges.rst b/clang-tools-extra/docs/clang-tidy/checks/modernize/use-ranges.rst
index 1ce866ca1f66a0..912b42b33f9194 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/modernize/use-ranges.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/modernize/use-ranges.rst
@@ -104,6 +104,9 @@ Calls to the following std library algorithms are checked:
 ``std::unique``,
 ``std::upper_bound``.
 
+Note: some range algorithms for ``vector<bool>`` require C++23 because it uses
+proxy iterators.
+
 Reverse Iteration
 -----------------
 



More information about the cfe-commits mailing list