Use constexpr instead of ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20

These are equivalent since they fall back to the standard library. There's no need to reimpose whatever constraints the standard library already imposes.

PiperOrigin-RevId: 926341943
Change-Id: I406d1203ca2d4fec68ae7a06eef0cf2dad6916dd
This commit is contained in:
Abseil Team
2026-06-03 16:36:00 -07:00
committed by Copybara-Service
parent bc5c03f738
commit d96371953c
5 changed files with 251 additions and 331 deletions

View File

@@ -85,8 +85,8 @@ constexpr ForwardIt rotate(ForwardIt first, ForwardIt n_first, ForwardIt last) {
// n = (`last` - `first`) comparisons. A linear search over short containers
// may be faster than a binary search, even when the container is sorted.
template <typename InputIterator, typename EqualityComparable>
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool linear_search(
InputIterator first, InputIterator last, const EqualityComparable& value) {
constexpr bool linear_search(InputIterator first, InputIterator last,
const EqualityComparable& value) {
return std::find(first, last, value) != last;
}