[all-commits] [llvm/llvm-project] 8fdfe3: [libc++] Refactor ranges::{min, max, min_element, ...
Peng Liu via All-commits
all-commits at lists.llvm.org
Thu Mar 27 06:05:58 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8fdfe3f2a752b5886faf88c96ce61a0465f7dc9b
https://github.com/llvm/llvm-project/commit/8fdfe3f2a752b5886faf88c96ce61a0465f7dc9b
Author: Peng Liu <winner245 at hotmail.com>
Date: 2025-03-27 (Thu, 27 Mar 2025)
Changed paths:
M libcxx/include/__algorithm/min_element.h
M libcxx/include/__algorithm/ranges_max.h
M libcxx/include/__algorithm/ranges_max_element.h
M libcxx/include/__algorithm/ranges_min.h
M libcxx/include/__algorithm/ranges_min_element.h
Log Message:
-----------
[libc++] Refactor ranges::{min, max, min_element, max_element} to use std::__min_element (#132418)
Previously, ranges::min_element delegated to ranges::__min_element_impl, which
duplicated the definition of std::__min_element. This patch updates
ranges::min_element to directly call std::__min_element, which allows
removing the redundant code in ranges::__min_element_impl.
Upon removal of ranges::__min_element_impl, the other ranges algorithms
ranges::{min,max,max_element}, which previously delegated to ranges::__min_element_impl,
have been updated to call std::__min_element instead.
This refactoring unifies the implementation across these algorithms,
ensuring that future optimizations or maintenance work only need to be
applied in one place.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list