Why are all these unrelated changes needed. This diff compiles fine for me on top:
0diff --git a/src/rpc/util.cpp b/src/rpc/util.cpp
1index 597da6e7fb..860fa198d5 100644
2--- a/src/rpc/util.cpp
3+++ b/src/rpc/util.cpp
4@@ -751,7 +751,7 @@ std::string RPCArg::ToString(const bool oneline) const
5 }
6 case Type::OBJ:
7 case Type::OBJ_USER_KEYS: {
8- const std::string res = Join(m_inner, std::string(","), [&](const RPCArg& i) { return i.ToStringObj(oneline); });
9+ const std::string res = Join(m_inner, ",", [&](const RPCArg& i) { return i.ToStringObj(oneline); });
10 if (m_type == Type::OBJ) {
11 return "{" + res + "}";
12 } else {
13diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
14index f71e7efa2b..45b7fd4932 100644
15--- a/src/test/util_tests.cpp
16+++ b/src/test/util_tests.cpp
17@@ -141,15 +141,15 @@ BOOST_AUTO_TEST_CASE(util_HexStr)
18 BOOST_AUTO_TEST_CASE(util_Join)
19 {
20 // Normal version
21- BOOST_CHECK_EQUAL(Join({}, std::string(", ")), "");
22- BOOST_CHECK_EQUAL(Join({"foo"}, std::string(", ")), "foo");
23- BOOST_CHECK_EQUAL(Join({"foo", "bar"}, std::string(", ")), "foo, bar");
24+ BOOST_CHECK_EQUAL(Join({}, ", "), "");
25+ BOOST_CHECK_EQUAL(Join({"foo"}, ", "), "foo");
26+ BOOST_CHECK_EQUAL(Join({"foo", "bar"}, ", "), "foo, bar");
27
28 // Version with unary operator
29 const auto op_upper = [](const std::string& s) { return ToUpper(s); };
30- BOOST_CHECK_EQUAL(Join<std::string>({}, std::string(", "), op_upper), "");
31- BOOST_CHECK_EQUAL(Join<std::string>({"foo"}, std::string(", "), op_upper), "FOO");
32- BOOST_CHECK_EQUAL(Join<std::string>({"foo", "bar"}, std::string(", "), op_upper), "FOO, BAR");
33+ BOOST_CHECK_EQUAL(Join<std::string>({}, ", ", op_upper), "");
34+ BOOST_CHECK_EQUAL(Join<std::string>({"foo"}, ", ", op_upper), "FOO");
35+ BOOST_CHECK_EQUAL(Join<std::string>({"foo", "bar"}, ", ", op_upper), "FOO, BAR");
36 }
37
38 BOOST_AUTO_TEST_CASE(util_FormatParseISO8601DateTime)
39diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
40index 0534befd3d..dda00f1fe7 100644
41--- a/src/wallet/rpcwallet.cpp
42+++ b/src/wallet/rpcwallet.cpp
43@@ -2597,7 +2597,7 @@ static UniValue loadwallet(const JSONRPCRequest& request)
44
45 UniValue obj(UniValue::VOBJ);
46 obj.pushKV("name", wallet->GetName());
47- obj.pushKV("warning", Join(warnings, std::string("\n"), OpOriginal));
48+ obj.pushKV("warning", Join(warnings, "\n", OpOriginal));
49
50 return obj;
51 }
52@@ -2737,7 +2737,7 @@ static UniValue createwallet(const JSONRPCRequest& request)
53
54 UniValue obj(UniValue::VOBJ);
55 obj.pushKV("name", wallet->GetName());
56- obj.pushKV("warning", Join(warnings, std::string("\n"), OpOriginal));
57+ obj.pushKV("warning", Join(warnings, "\n", OpOriginal));
58
59 return obj;
60 }