[libcxx-commits] [libcxx] [libcxx] Add missing member `cend()` to `MinSequenceContainer` (PR #175114)
Vojtěch Michal via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jan 8 19:37:30 PST 2026
https://github.com/vmichal created https://github.com/llvm/llvm-project/pull/175114
The `MinSequenceContainer` (used in tests for `<flat_map>` and `<flat_set>`) currently provides `begin()`, `end()`, `cbegin()` but no `cend()`.
[[container.reqmts]](https://eel.is/c++draft/container.requirements#container.reqmts-33) lists member function `cend` as one of container requirements, together with `begin()` and others.
>From 77193a0d3fe28ee92bd80c3952643624a58cf32f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Vojt=C4=9Bch=20Michal?= <vojta.michall at email.cz>
Date: Fri, 9 Jan 2026 04:24:39 +0100
Subject: [PATCH] Add member cend() to the MinSequenceContainer (used by
flat_set/flat_map tests).
---
libcxx/test/support/MinSequenceContainer.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/libcxx/test/support/MinSequenceContainer.h b/libcxx/test/support/MinSequenceContainer.h
index f9e67cd726eb7..721fefccdb6cc 100644
--- a/libcxx/test/support/MinSequenceContainer.h
+++ b/libcxx/test/support/MinSequenceContainer.h
@@ -54,6 +54,7 @@ struct MinSequenceContainer {
TEST_CONSTEXPR_CXX20 const_iterator cbegin() const { return const_iterator(data_.data()); }
TEST_CONSTEXPR_CXX20 iterator end() { return begin() + size(); }
TEST_CONSTEXPR_CXX20 const_iterator end() const { return begin() + size(); }
+ TEST_CONSTEXPR_CXX20 const_iterator cend() const { return begin() + size(); }
TEST_CONSTEXPR_CXX20 size_type size() const { return static_cast<size_type>(data_.size()); }
TEST_CONSTEXPR_CXX20 bool empty() const { return data_.empty(); }
More information about the libcxx-commits
mailing list