From 6db8353e76f549d087746ac2ef33c384ced951c9 Mon Sep 17 00:00:00 2001 From: Curve Date: Wed, 28 Aug 2024 12:07:56 +0200 Subject: [PATCH] fix(scheme): compilation on apple clang MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Why can't we have nice things (~_~メ) --- src/scheme.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/scheme.cpp b/src/scheme.cpp index 0067336..a320c22 100644 --- a/src/scheme.cpp +++ b/src/scheme.cpp @@ -67,9 +67,10 @@ extern "C" *headers = static_cast(saucer_memory_alloc(*count * sizeof(char *))); *values = static_cast(saucer_memory_alloc(*count * sizeof(char *))); - for (const auto &[index, element] : std::views::enumerate(data)) + for (auto it = data.begin(); it != data.end(); it++) { - const auto &[header, value] = element; + const auto &[header, value] = *it; + const auto index = std::distance(data.begin(), it); (*headers)[index] = static_cast(saucer_memory_alloc(header.capacity())); (*values)[index] = static_cast(saucer_memory_alloc(value.capacity()));