[libcxx-commits] [libcxx] [libc++] Optimize ranges::{for_each, for_each_n} for segmented iterators (PR #132896)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 27 06:40:47 PDT 2025


================
@@ -20,7 +20,6 @@ algorithm iterator
 algorithm limits
 algorithm memory
 algorithm new
-algorithm optional
----------------
ldionne wrote:

The removal of these transitive includes is technically a breaking change (since people including `<algorithm>` might be expecting `std::optional` to be provided). To prevent these kinds of breakages, we add `#include <optional>` to the headers that previously included it. At the bottom of `<algorithm>` you should find a list of such includes guarded by `#  if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20`.

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


More information about the libcxx-commits mailing list