回复 5楼 鱼游海底
template<typename T1, typename T2>
auto myplus( const T1& a, const T2& b ) -> decltype(a+b)
{
return a+b;
}
std::string myplus( const char* a, const char* b )
{
return std::string(a)+b;
}
std::wstring myplus( const wchar_t* a, const wchar_t* b )
{
return std::wstring(a)+b;
}
char/wchar_t 的你自己加吧,大体就这样