From 8d272b28712f2db553ebaa4d7faddc9e272c47a0 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Mon, 11 Nov 2024 12:03:07 -0800 Subject: [PATCH] Make Span's relational operators constexpr since C++20. _The implementation has not changed, only constexpr markers have been added._ PiperOrigin-RevId: 695435063 Change-Id: I66cd03195e429534c0e58c330f1019c89025abed --- absl/types/internal/span.h | 5 +-- absl/types/span.h | 68 +++++++++++++++++++++----------------- absl/types/span_test.cc | 41 +++++++++++++++++++++-- 3 files changed, 79 insertions(+), 35 deletions(-) diff --git a/absl/types/internal/span.h b/absl/types/internal/span.h index ab89ba3c..1039f612 100644 --- a/absl/types/internal/span.h +++ b/absl/types/internal/span.h @@ -22,6 +22,7 @@ #include #include "absl/algorithm/algorithm.h" +#include "absl/base/config.h" #include "absl/base/internal/throw_delegate.h" #include "absl/meta/type_traits.h" @@ -86,13 +87,13 @@ using EnableIfMutable = typename std::enable_if::value, int>::type; template