Commit cdf5327a authored by chenguoping's avatar chenguoping

Fix issue#2086

parent d7b032f5
...@@ -3759,7 +3759,8 @@ class basic_json ...@@ -3759,7 +3759,8 @@ class basic_json
@since version 1.0.0 @since version 1.0.0
*/ */
template<class ValueType, typename std::enable_if< template<class ValueType, typename std::enable_if<
std::is_convertible<basic_json_t, ValueType>::value, int>::type = 0> std::is_convertible<basic_json_t, ValueType>::value
and not std::is_same<value_t, ValueType>::value, int>::type = 0>
ValueType value(const typename object_t::key_type& key, const ValueType& default_value) const ValueType value(const typename object_t::key_type& key, const ValueType& default_value) const
{ {
// at only works for objects // at only works for objects
......
...@@ -19205,7 +19205,8 @@ class basic_json ...@@ -19205,7 +19205,8 @@ class basic_json
@since version 1.0.0 @since version 1.0.0
*/ */
template<class ValueType, typename std::enable_if< template<class ValueType, typename std::enable_if<
std::is_convertible<basic_json_t, ValueType>::value, int>::type = 0> std::is_convertible<basic_json_t, ValueType>::value
and not std::is_same<value_t, ValueType>::value, int>::type = 0>
ValueType value(const typename object_t::key_type& key, const ValueType& default_value) const ValueType value(const typename object_t::key_type& key, const ValueType& default_value) const
{ {
// at only works for objects // at only works for objects
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment