[libc-commits] [libc] [libc][NFC] Fix missing constexpr qualifier in cpp::array (PR #81862)

Guillaume Chatelet via libc-commits libc-commits at lists.llvm.org
Thu Feb 15 06:17:02 PST 2024


https://github.com/gchatelet created https://github.com/llvm/llvm-project/pull/81862

None

>From 6fcccbd3245b6346dcfbbe88a00023e432546f46 Mon Sep 17 00:00:00 2001
From: Guillaume Chatelet <chatelet.guillaume at gmail.com>
Date: Thu, 15 Feb 2024 15:15:48 +0100
Subject: [PATCH] [libc][NFC] Fix missing constexpr qualifier in cpp::array

---
 libc/src/__support/CPP/array.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libc/src/__support/CPP/array.h b/libc/src/__support/CPP/array.h
index 12e57489998806..1897066514092c 100644
--- a/libc/src/__support/CPP/array.h
+++ b/libc/src/__support/CPP/array.h
@@ -47,7 +47,7 @@ template <class T, size_t N> struct array {
   LIBC_INLINE constexpr const_iterator begin() const { return Data; }
 
   LIBC_INLINE constexpr iterator end() { return Data + N; }
-  LIBC_INLINE const_iterator end() const { return Data + N; }
+  LIBC_INLINE constexpr const_iterator end() const { return Data + N; }
 };
 
 } // namespace cpp



More information about the libc-commits mailing list