[libc-commits] [libc] [libc][wctype] Upstream zip utility from PtrHash-cc prototype to LLVM libc (PR #174759)
Marcell Leleszi via libc-commits
libc-commits at lists.llvm.org
Wed Jan 7 12:44:12 PST 2026
================
@@ -0,0 +1,78 @@
+//===-- Internal utils for wctype conversion code - zip ---------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+// Helper iterator for zipping two containers together. `__support` code can not
+// have dependencies, so we implement a minimal zip here used internally.
+
+#ifndef LLVM_LIBC_SRC___SUPPORT_WCTYPE_CONVERSION_UTILS_ZIP_H
+#define LLVM_LIBC_SRC___SUPPORT_WCTYPE_CONVERSION_UTILS_ZIP_H
+
+#include "src/__support/CPP/tuple.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+namespace wctype_internal {
+
+namespace conversion_utils {
+
+namespace {
+
+template <typename It1, typename It2> class ZipIterator {
----------------
mleleszi wrote:
please add some tests
https://github.com/llvm/llvm-project/pull/174759
More information about the libc-commits
mailing list