diff --git a/include/nlohmann/detail/conversions/to_json.hpp b/include/nlohmann/detail/conversions/to_json.hpp index ba24c118d..52ddaddef 100644 --- a/include/nlohmann/detail/conversions/to_json.hpp +++ b/include/nlohmann/detail/conversions/to_json.hpp @@ -268,8 +268,8 @@ inline void to_json(BasicJsonType& j, T b) noexcept } template::reference&, typename BasicJsonType::boolean_t>::value, int> = 0> -inline void to_json(BasicJsonType& j, const std::vector::reference& b) noexcept + enable_if_t::const_reference&, typename BasicJsonType::boolean_t>::value, int> = 0> +inline void to_json(BasicJsonType& j, std::vector::const_reference& b) noexcept { external_constructor::construct(j, static_cast(b)); }