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 26418fe commit c4e3f78
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/jsoncons/basic_json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3244,7 +3244,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_unsigned_integer<IntegerType>::value && sizeof(IntegerType) <= sizeof(uint64_t), int>::type = 0)
{
construct<uint64_storage>(val, tag);
Expand Down Expand Up @@ -3313,7 +3313,7 @@ namespace jsoncons {
construct<null_storage>(tag);
}

basic_json(bool val, semantic_tag tag)
basic_json(bool val, semantic_tag tag = semantic_tag::none)
{
construct<bool_storage>(val,tag);
}
Expand Down
1 change: 1 addition & 0 deletions test/corelib/src/ojson_object_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ TEST_CASE("ojson object erase with iterator")
CHECK(doc.size() == 1);
CHECK(doc.at("b") == 2);
CHECK(doc.at("b") == 2.0);
CHECK(doc.at("b") == 2.0f);
CHECK(doc["b"] == 2);
}

Expand Down

0 comments on commit c4e3f78

Please sign in to comment.