diff --git a/cpp/src/barretenberg/serialize/msgpack_impl/variant_impl.hpp b/cpp/src/barretenberg/serialize/msgpack_impl/variant_impl.hpp index 8241ba47ab..66fe6398be 100644 --- a/cpp/src/barretenberg/serialize/msgpack_impl/variant_impl.hpp +++ b/cpp/src/barretenberg/serialize/msgpack_impl/variant_impl.hpp @@ -9,8 +9,8 @@ namespace msgpack::adaptor { template struct pack> { auto &operator()(auto& o, std::variant const &variant) const { - std::visit([&o](auto &&arg) { msgpack::pack(o, arg); }, variant); + std::visit([&o](const auto& arg) { o.pack(arg); }, variant); return o; } }; -} \ No newline at end of file +}