|
添加两个这样的函数,很难吗?
```c++
template
inline constexpr std::basic_string operator+(
std::basic_string&& lhs,
std::basic_string_view rhs) {
lhs.append(rhs.begin(), rhs.end());
return lhs;
}
template
inline constexpr std::basic_string operator+(
std::basic_string_view lhs,
std::basic_string&& rhs) {
rhs.append(lhs.begin(), lhs.end());
return rhs;
}
``` |
|