阅读背景:

在C ++中,我希望我的接口,.h说int getSomeInt()const; ...但实际上方法* DOES *更新“this”。

来源:互联网 

I'm adding some lazy initialization logic to a const method, which makes the method in fact not const. Is there a way for me to do this without having to remove the "const" from the public interface?I'm adding some lazy initialization logic to a




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

分享到: