diff --git a/CMakeLists.txt b/CMakeLists.txt index 60c2031..2421772 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,7 +113,7 @@ set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}") set(META_APP_DESCRIPTION "Useful C++ classes and routines such as argument parser, IO and conversion utilities") set(META_FEATURES_FOR_COMPILER_DETECTION_HEADER cxx_thread_local) set(META_VERSION_MAJOR 5) -set(META_VERSION_MINOR 5) +set(META_VERSION_MINOR 6) set(META_VERSION_PATCH 0) # find required 3rd party libraries diff --git a/conversion/stringconversion.h b/conversion/stringconversion.h index fdbc1dc..f059a5f 100644 --- a/conversion/stringconversion.h +++ b/conversion/stringconversion.h @@ -71,13 +71,12 @@ CPP_UTILITIES_EXPORT void truncateString(std::string &str, char terminationChar * \tparam Container The STL-container used to provide the \a strings. * \returns Returns the joined string. */ -template > -typename Container::value_type joinStrings(const Container &strings, - const typename Container::value_type &delimiter = typename Container::value_type(), bool omitEmpty = false, - const typename Container::value_type &leftClosure = typename Container::value_type(), +template , class ReturnType = typename Container::value_type> +ReturnType joinStrings(const Container &strings, const typename Container::value_type &delimiter = typename Container::value_type(), + bool omitEmpty = false, const typename Container::value_type &leftClosure = typename Container::value_type(), const typename Container::value_type &rightClosure = typename Container::value_type()) { - typename Container::value_type res; + ReturnType res; if (!strings.size()) { return res; }