diff --git a/include/jsoncons_ext/jsonpath/jsonpath_expression.hpp b/include/jsoncons_ext/jsonpath/jsonpath_expression.hpp index 14ff699edc..389b3bb572 100644 --- a/include/jsoncons_ext/jsonpath/jsonpath_expression.hpp +++ b/include/jsoncons_ext/jsonpath/jsonpath_expression.hpp @@ -2748,7 +2748,7 @@ namespace detail { template auto make_update_expression(const typename Json::string_view_type& path, - const jsoncons::jsonpath::custom_functions& funcs = jsoncons::jsonpath::custom_functions()) + const jsoncons::jsonpath::custom_functions::value_type>& funcs = jsoncons::jsonpath::custom_functions::value_type>()) { using jsonpath_traits_type = jsoncons::jsonpath::jsonpath_traits; @@ -2766,7 +2766,7 @@ namespace detail { template auto make_update_expression(const allocator_set& alloc_set, const typename Json::string_view_type& path, - const jsoncons::jsonpath::custom_functions& funcs, std::error_code& ec) + const jsoncons::jsonpath::custom_functions::value_type>& funcs, std::error_code& ec) { using jsonpath_traits_type = jsoncons::jsonpath::jsonpath_traits; diff --git a/test/jsonpath/src/jsonpath_make_expression_tests.cpp b/test/jsonpath/src/jsonpath_make_expression_tests.cpp index faed2e9536..73a9b798d0 100644 --- a/test/jsonpath/src/jsonpath_make_expression_tests.cpp +++ b/test/jsonpath/src/jsonpath_make_expression_tests.cpp @@ -51,14 +51,14 @@ TEST_CASE("jsonpath make_expression test") ] } )"; -#if 0 + SECTION("test 1") { int count = 0; const json doc = json::parse(input); - auto expr = jsoncons::jsonpath::make_update_expression("$.books[*]"); + auto expr = jsoncons::jsonpath::make_update_expression("$.books[*]"); auto callback = [&](const jsonpath::json_location& /*location*/, const json& book) { @@ -73,7 +73,7 @@ TEST_CASE("jsonpath make_expression test") CHECK(count == 1); CHECK_FALSE(doc["books"][3].contains("price")); } -#endif + SECTION("test 2") { int count = 0;