Merge functions

This commit is contained in:
King_DuckZ 2021-05-28 02:48:07 +02:00
parent 9539b5430f
commit d0e7ca0bee
2 changed files with 3 additions and 9 deletions

View file

@ -320,8 +320,9 @@ namespace dhandy {
return std::string(int_to_ary(num).to_string_view());
}
template <std::size_t S>
std::string operator+ (std::string a, const ReversedSizedArray<char, S>& b) {
template <typename C, std::size_t S>
inline
std::basic_string<C> operator+ (std::basic_string<C> a, const ReversedSizedArray<C, S>& b) {
a.append(b.data(), b.size() - 1);
return a;
}

View file

@ -72,13 +72,6 @@ namespace dhandy {
stream << arr.to_string_view();
return stream;
}
template <typename T, std::size_t S>
inline
std::basic_string<T> operator+ (std::basic_string<T>&& a, const ReversedSizedArray<T, S>& b) {
a.insert(a.end(), b.begin(), b.end());
return a;
}
#endif
} //namespace dhandy