From 3a6bc13b7556d7f7d0f50cda3be901dea0679cc3 Mon Sep 17 00:00:00 2001 From: MistEO Date: Fri, 15 Mar 2024 19:48:33 +0800 Subject: [PATCH] fix: try to fix move error --- include/common/array.hpp | 4 ++-- include/common/value.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/common/array.hpp b/include/common/array.hpp index 11dba82..0def374 100644 --- a/include/common/array.hpp +++ b/include/common/array.hpp @@ -51,8 +51,8 @@ class basic_array template < typename fixed_array_t, std::enable_if_t<_utils::is_fixed_array, bool> = true> - basic_array(fixed_array_t arr) - : _array_data(std::make_move_iterator(arr.begin()), std::make_move_iterator(arr.end())) + basic_array(const fixed_array_t& arr) + : _array_data(arr.begin(), arr.end()) { } diff --git a/include/common/value.hpp b/include/common/value.hpp index 5b9896c..b231d00 100644 --- a/include/common/value.hpp +++ b/include/common/value.hpp @@ -80,8 +80,8 @@ class basic_value template < typename fixed_array_t, std::enable_if_t<_utils::is_fixed_array, bool> = true> - basic_value(fixed_array_t arr) - : basic_value(basic_array(std::move(arr))) + basic_value(const fixed_array_t& arr) + : basic_value(basic_array(arr)) { }