aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorMacroFake <falke.marco@gmail.com>2022-08-19 19:44:03 +0200
committerMacroFake <falke.marco@gmail.com>2022-08-19 19:44:16 +0200
commitfaf8da3c8da275c104330ef2743c5a062bea2f4b (patch)
treec22ac519315bcab10abcc0f6a722ba4a9074f6f0 /src/util
parent9eaef10801051385c074fca13afe1297e8494ea5 (diff)
downloadbitcoin-faf8da3c8da275c104330ef2743c5a062bea2f4b.tar.xz
Remove Join() helper only used in tests
Also remove redundant return type that can be deduced by the compiler.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/string.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/util/string.h b/src/util/string.h
index dd4de888bb..f8d36493b8 100644
--- a/src/util/string.h
+++ b/src/util/string.h
@@ -66,7 +66,6 @@ void ReplaceAll(std::string& in_out, const std::string& search, const std::strin
*/
template <typename T, typename BaseType, typename UnaryOp>
auto Join(const std::vector<T>& list, const BaseType& separator, UnaryOp unary_op)
- -> decltype(unary_op(list.at(0)))
{
decltype(unary_op(list.at(0))) ret;
for (size_t i = 0; i < list.size(); ++i) {
@@ -82,12 +81,6 @@ T Join(const std::vector<T>& list, const T2& separator)
return Join(list, separator, [](const T& i) { return i; });
}
-// Explicit overload needed for c_str arguments, which would otherwise cause a substitution failure in the template above.
-inline std::string Join(const std::vector<std::string>& list, std::string_view separator)
-{
- return Join<std::string>(list, separator);
-}
-
/**
* Create an unordered multi-line list of items.
*/