summaryrefslogtreecommitdiff
path: root/include/lib/modernjson/detail/conversions/to_json.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/lib/modernjson/detail/conversions/to_json.hpp')
-rw-r--r--include/lib/modernjson/detail/conversions/to_json.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/lib/modernjson/detail/conversions/to_json.hpp b/include/lib/modernjson/detail/conversions/to_json.hpp
index 37210ad..5c3669c 100644
--- a/include/lib/modernjson/detail/conversions/to_json.hpp
+++ b/include/lib/modernjson/detail/conversions/to_json.hpp
@@ -306,13 +306,13 @@ void to_json(BasicJsonType& j, const std::pair<Args...>& p)
// for https://github.com/nlohmann/json/pull/1134
template<typename BasicJsonType, typename T,
enable_if_t<std::is_same<T, typename iteration_proxy<typename BasicJsonType::iterator>::iteration_proxy_internal>::value, int> = 0>
-void to_json(BasicJsonType& j, T b) noexcept
+void to_json(BasicJsonType& j, const T& b)
{
j = {{b.key(), b.value()}};
}
template<typename BasicJsonType, typename Tuple, std::size_t... Idx>
-void to_json_tuple_impl(BasicJsonType& j, const Tuple& t, index_sequence<Idx...>)
+void to_json_tuple_impl(BasicJsonType& j, const Tuple& t, index_sequence<Idx...> /*unused*/)
{
j = {std::get<Idx>(t)...};
}
@@ -332,11 +332,11 @@ struct to_json_fn
return to_json(j, std::forward<T>(val));
}
};
-}
+} // namespace detail
/// namespace to hold default `to_json` function
namespace
{
constexpr const auto& to_json = detail::static_const<detail::to_json_fn>::value;
-}
-}
+} // namespace
+} // namespace nlohmann