[clang] [clang] Add tests for some of CWG issues resolved in Croydon (2026-03) (PR #189299)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Mon May 4 03:43:37 PDT 2026


================
@@ -18,6 +18,25 @@
 #endif
 
 namespace std {
+#if __cplusplus >= 201103L
+using size_t = decltype(sizeof(0));
+template <typename T>
+struct initializer_list {
+  const T *p;
+  size_t n;
+
+  #if __cplusplus >= 201402L
+  constexpr
+  #endif
+  initializer_list(const T *p, size_t n);
+
+  #if __cplusplus >= 201402L
+  constexpr
+  #endif
+  const T* begin() const { return {}; };
----------------
Endilll wrote:

It doesn't matter for the tests. I just had to define the function, because it's `constexpr`. But I fixed it, thank you.

https://github.com/llvm/llvm-project/pull/189299


More information about the cfe-commits mailing list