Skip to content

Commit

Permalink
Improve basic_json ctors
Browse files Browse the repository at this point in the history
  • Loading branch information
danielaparker committed Oct 21, 2024
1 parent c4e3f78 commit 3b6a0d0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/jsoncons/basic_json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3151,7 +3151,8 @@ namespace jsoncons {
}

template <typename T,
class = typename std::enable_if<!is_proxy_of<T,basic_json>::value && !extension_traits::is_basic_json<T>::value>::type>
class = typename std::enable_if<!is_proxy_of<T,basic_json>::value && !extension_traits::is_basic_json<T>::value
&& !extension_traits::is_integer<T>::value, int>::type>
basic_json(const T& val)
: basic_json(json_type_traits<basic_json,T>::to_json(val))
{
Expand Down Expand Up @@ -3274,7 +3275,7 @@ namespace jsoncons {
}

template <typename IntegerType>
basic_json(IntegerType val, semantic_tag tag,
basic_json(IntegerType val, semantic_tag tag = semantic_tag::none,
typename std::enable_if<extension_traits::is_signed_integer<IntegerType>::value && sizeof(IntegerType) <= sizeof(int64_t),int>::type = 0)
{
construct<int64_storage>(val, tag);
Expand Down

0 comments on commit 3b6a0d0

Please sign in to comment.