From 534f80635df4be8ed1c9d427713221faad92dcf6 Mon Sep 17 00:00:00 2001 From: Bernhard Manfred Gruber Date: Sun, 30 May 2021 03:01:19 +0200 Subject: [PATCH] workaround g++ < 11 failing to handle lambda force inline and trailing return type --- examples/viewcopy/viewcopy.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/viewcopy/viewcopy.cpp b/examples/viewcopy/viewcopy.cpp index eb26984565..55b66bb237 100644 --- a/examples/viewcopy/viewcopy.cpp +++ b/examples/viewcopy/viewcopy.cpp @@ -199,12 +199,12 @@ void aosoa_copy_internal(const SrcView& srcView, DstView& dstView, std::size_t n return offset; }; // the same as SoA::blobNrAndOffset but takes a flat array index - auto mapSoA = [&](std::size_t flatArrayIndex, auto coord, bool mb) LLAMA_LAMBDA_INLINE -> llama::NrAndOffset + auto mapSoA = [&](std::size_t flatArrayIndex, auto coord, bool mb) LLAMA_LAMBDA_INLINE { const auto blob = mb * llama::flatRecordCoord; const auto offset = !mb * llama::offsetOf * flatSize + sizeof(llama::GetType) * flatArrayIndex; - return {blob, offset}; + return llama::NrAndOffset{blob, offset}; }; auto mapSrc = [&srcView, &mapAoSoA, &mapSoA](std::size_t flatArrayIndex, auto coord) LLAMA_LAMBDA_INLINE