d签名

原文
为什么不呢?给定如下签名:

int fun(string s) pure nothrow;

可假定s,因为这里无逃逸通道.返回值无指针,确保不访问全局,无其他赋值参数.
而签名为

int fun(string s) pure;

时,可赋值s异常,如何避免/检测它?

posted @ 2022-01-05 20:45  zjh6  阅读(18)  评论(0)    收藏  举报  来源