阅读背景:

我真的需要为const对象实现用户提供的构造函数吗?

来源:互联网 

I have the code:

我的代码:

class A {
  public:
    A() = default;

  private:
    int i = 1;
};

int main() {
  const A a;
  return 0;
}
class A {
  public:



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

分享到: