From ce58dfdad8f504b40a0a6300d5d4664e89b7decb Mon Sep 17 00:00:00 2001 From: MistEO Date: Thu, 26 Oct 2023 14:59:18 +0800 Subject: [PATCH] fix: initializer_list arg type --- include/json.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/json.hpp b/include/json.hpp index 8e9711a..bed68c3 100644 --- a/include/json.hpp +++ b/include/json.hpp @@ -90,7 +90,7 @@ class basic_value basic_value(basic_array arr); basic_value(basic_object obj); - basic_value(std::initializer_list>> init_list); + basic_value(std::initializer_list::value_type> init_list); // Constructed from raw data template @@ -263,7 +263,7 @@ class basic_array basic_array(basic_array&& rhs) noexcept = default; basic_array(const raw_array& arr); basic_array(raw_array&& arr) noexcept; - basic_array(std::initializer_list init_list); + basic_array(std::initializer_list init_list); basic_array(typename raw_array::size_type size); explicit basic_array(const basic_value& val); @@ -712,7 +712,7 @@ MEOJSON_INLINE basic_value::basic_value(basic_object obj) template MEOJSON_INLINE basic_value::basic_value( - std::initializer_list>> init_list) + std::initializer_list::value_type> init_list) : _type(value_type::object), _raw_data(std::make_unique>(init_list)) { ; @@ -1666,7 +1666,7 @@ MEOJSON_INLINE basic_object::basic_object(raw_object&& raw_obj) : _obj } template -MEOJSON_INLINE basic_object::basic_object(std::initializer_list init_list) +MEOJSON_INLINE basic_object::basic_object(std::initializer_list init_list) { for (const auto& [key, val] : init_list) { emplace(key, val);