diff --git a/include/json.hpp b/include/json.hpp index dd89fb7..077f044 100644 --- a/include/json.hpp +++ b/include/json.hpp @@ -266,17 +266,17 @@ class basic_array basic_array() = default; basic_array(const basic_array& rhs) = default; 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(typename raw_array::size_type size); explicit basic_array(const basic_value& val); explicit basic_array(basic_value&& val); - template >> - basic_array(array_t arr) : _array_data(std::make_move_iterator(arr.begin()), std::make_move_iterator(arr.end())) + template < + typename collection_t, + typename _ = std::enable_if_t>> + basic_array(collection_t arr) + : _array_data(std::make_move_iterator(arr.begin()), std::make_move_iterator(arr.end())) {} ~basic_array() noexcept = default; @@ -381,8 +381,6 @@ class basic_object basic_object() = default; basic_object(const basic_object& rhs) = default; basic_object(basic_object&& rhs) noexcept = default; - basic_object(const raw_object& raw_obj); - basic_object(raw_object&& raw_obj); basic_object(std::initializer_list init_list); explicit basic_object(const basic_value& val); explicit basic_object(basic_value&& val); @@ -1334,18 +1332,6 @@ MEOJSON_INLINE typename basic_value::var_t basic_value::deep // * basic_array impl * // ****************************** -template -MEOJSON_INLINE basic_array::basic_array(const raw_array& arr) : _array_data(arr) -{ - ; -} - -template -MEOJSON_INLINE basic_array::basic_array(raw_array&& arr) noexcept : _array_data(std::move(arr)) -{ - ; -} - template MEOJSON_INLINE basic_array::basic_array(std::initializer_list init_list) : _array_data(init_list) { @@ -1655,18 +1641,6 @@ MEOJSON_INLINE bool basic_array::operator==(const basic_array -MEOJSON_INLINE basic_object::basic_object(const raw_object& raw_obj) : _object_data(raw_obj) -{ - ; -} - -template -MEOJSON_INLINE basic_object::basic_object(raw_object&& raw_obj) : _object_data(std::move(raw_obj)) -{ - ; -} - template MEOJSON_INLINE basic_object::basic_object(std::initializer_list init_list) : _object_data(std::make_move_iterator(init_list.begin()), std::make_move_iterator(init_list.end()))