阅读背景:

在c++中使用临时对象作为默认参数安全吗?

来源:互联网 

For example:

例如:

int StrLen(const std::string &s = "default string") {
  const std::string &t = "another string";  // BTW, is this line safe?
  return s.size();
}
int StrLen(const std::stri



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: