Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: clang compile error #32

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions include/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ class basic_value
return format(indent, 0);
}

template <typename value_t, template <typename> typename vector_t = std::vector>
template <typename value_t, template <typename...> typename vector_t = std::vector>
vector_t<value_t> to_vector() const;
template <typename value_t, template <typename, typename> typename map_t = std::map>
template <typename value_t, template <typename...> typename map_t = std::map>
map_t<string_t, value_t> to_map() const;

basic_value<string_t>& operator=(const basic_value<string_t>& rhs);
Expand Down Expand Up @@ -313,7 +313,7 @@ class basic_array
{
return format(indent, 0);
}
template <typename value_t, template <typename> typename vector_t = std::vector>
template <typename value_t, template <typename...> typename vector_t = std::vector>
vector_t<value_t> to_vector() const;

// Usage: get(key_1, key_2, ..., default_value);
Expand Down Expand Up @@ -425,7 +425,7 @@ class basic_object
{
return format(indent, 0);
}
template <typename value_t, template <typename, typename> typename map_t = std::map>
template <typename value_t, template <typename...> typename map_t = std::map>
map_t<string_t, value_t> to_map() const;

// Usage: get(key_1, key_2, ..., default_value);
Expand Down Expand Up @@ -1153,14 +1153,14 @@ inline string_t basic_value<string_t>::format(size_t indent, size_t indent_times
}

template <typename string_t>
template <typename value_t, template <typename> typename vector_t>
template <typename value_t, template <typename...> typename vector_t>
inline vector_t<value_t> basic_value<string_t>::to_vector() const
{
return as_array().template to_vector<value_t, vector_t>();
}

template <typename string_t>
template <typename value_t, template <typename, typename> typename map_t>
template <typename value_t, template <typename...> typename map_t>
inline map_t<string_t, value_t> basic_value<string_t>::to_map() const
{
return as_object().template to_map<value_t, map_t>();
Expand Down Expand Up @@ -1449,7 +1449,7 @@ namespace _to_vector_helper
}

template <typename string_t>
template <typename value_t, template <typename> typename vector_t>
template <typename value_t, template <typename...> typename vector_t>
inline vector_t<value_t> basic_array<string_t>::to_vector() const
{

Expand Down Expand Up @@ -1773,7 +1773,7 @@ inline string_t basic_object<string_t>::format(size_t indent, size_t indent_time
}

template <typename string_t>
template <typename value_t, template <typename, typename> typename map_t>
template <typename value_t, template <typename...> typename map_t>
inline map_t<string_t, value_t> basic_object<string_t>::to_map() const
{
map_t<string_t, value_t> result;
Expand Down