From 37ebde53cfcf400ef01b59c80ae3f72039cd90f2 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Mon, 1 Jul 2024 11:33:54 -0700 Subject: Make c_begin, c_end, and c_distance conditionally constexpr. This allows them to be used in constexpr expressions, such as the following: ``` constexpr int distance = absl::c_distance(std::array()); ``` Requires at least C++17 to be constexpr. PiperOrigin-RevId: 648435141 Change-Id: I8136e351a6dc4c25f06ef895fb449f4f11048480 --- absl/algorithm/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'absl/algorithm/CMakeLists.txt') diff --git a/absl/algorithm/CMakeLists.txt b/absl/algorithm/CMakeLists.txt index 5577164d..252b6b20 100644 --- a/absl/algorithm/CMakeLists.txt +++ b/absl/algorithm/CMakeLists.txt @@ -48,6 +48,7 @@ absl_cc_library( ${ABSL_DEFAULT_COPTS} DEPS absl::algorithm + absl::config absl::core_headers absl::meta absl::nullability @@ -64,6 +65,7 @@ absl_cc_test( DEPS absl::algorithm_container absl::base + absl::config absl::core_headers absl::memory absl::span -- cgit v1.2.3