const string &shorterString(const string&s1,const string&s2)
{
return s1.size()<=s2.size()?s1:s2;
}
string &shorterString( string&s1,string&s2){
auto &r = shorterString(const_cast(s1),const_cast(s2));
return const_cast(r);
}
为什么调用非const函数不会发生递归调用