diff options
author | Abseil Team <absl-team@google.com> | 2024-07-01 11:33:54 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-07-01 11:34:46 -0700 |
commit | 37ebde53cfcf400ef01b59c80ae3f72039cd90f2 (patch) | |
tree | 1977c5d4878e02cdaa96ed831f775e47bbd58f57 /absl/algorithm/BUILD.bazel | |
parent | a27662352e9caafc264747562162a8a32ef36cb9 (diff) | |
download | abseil-37ebde53cfcf400ef01b59c80ae3f72039cd90f2.tar.gz abseil-37ebde53cfcf400ef01b59c80ae3f72039cd90f2.tar.bz2 abseil-37ebde53cfcf400ef01b59c80ae3f72039cd90f2.zip |
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<int, 3>());
```
Requires at least C++17 to be constexpr.
PiperOrigin-RevId: 648435141
Change-Id: I8136e351a6dc4c25f06ef895fb449f4f11048480
Diffstat (limited to 'absl/algorithm/BUILD.bazel')
-rw-r--r-- | absl/algorithm/BUILD.bazel | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/absl/algorithm/BUILD.bazel b/absl/algorithm/BUILD.bazel index ddf9e11f..f20e7290 100644 --- a/absl/algorithm/BUILD.bazel +++ b/absl/algorithm/BUILD.bazel @@ -65,6 +65,7 @@ cc_library( linkopts = ABSL_DEFAULT_LINKOPTS, deps = [ ":algorithm", + "//absl/base:config", "//absl/base:core_headers", "//absl/base:nullability", "//absl/meta:type_traits", @@ -79,6 +80,7 @@ cc_test( deps = [ ":container", "//absl/base", + "//absl/base:config", "//absl/base:core_headers", "//absl/memory", "//absl/types:span", |