diff options
author | Daniel Friesel <derf@finalrewind.org> | 2018-11-26 09:06:31 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2018-11-26 09:06:31 +0100 |
commit | 1542f34f0e0fc53324f6fdc5905f4b77b252a789 (patch) | |
tree | d2126bc53f8759c36809ff25b9ae3a19fd7aa362 /include/lib/modernjson/detail/conversions/to_json.hpp | |
parent | e7711c06640f098323cab80934c198090e9120a3 (diff) |
update nlohmann modernjson to v3.4 (with bson support)
Diffstat (limited to 'include/lib/modernjson/detail/conversions/to_json.hpp')
-rw-r--r-- | include/lib/modernjson/detail/conversions/to_json.hpp | 10 |
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 |