From 10fc3eda9cf383d111b155d87208bf36e113ce13 Mon Sep 17 00:00:00 2001 From: Ryan Ofsky Date: Mon, 22 Jan 2024 11:22:43 -0500 Subject: [PATCH] Fix support for vector serialization with libc++ The vector serialization supported added in https://github.com/chaincodelabs/libmultiprocess/pull/86 commit 1c6fb04dddfc0de35eb5952649fda83a030ff288 was only tested with libstdc++ not libc++ and caused a test compilation failure when compiling on macos, reported by edilmedeiros in https://github.com/chaincodelabs/libmultiprocess/issues/92 Fix the issue that was causing the build to fail: trying to use using vector's reference type instead of const_reference type when serializing the vector. Fixes #92 --- include/mp/proxy-types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mp/proxy-types.h b/include/mp/proxy-types.h index f11fb359..8236b0c9 100644 --- a/include/mp/proxy-types.h +++ b/include/mp/proxy-types.h @@ -881,7 +881,7 @@ ::capnp::Void BuildPrimitive(InvokeContext& invoke_context, Value&&, TypeList<:: return {}; } -inline static bool BuildPrimitive(InvokeContext& invoke_context, std::vector::reference value, TypeList) +inline static bool BuildPrimitive(InvokeContext& invoke_context, std::vector::const_reference value, TypeList) { return value; }