struct Foo {
int data;
Foo() = default;
Foo(const Foo& arg) = default;
};
但是我的编译器还没有默认的构造函数。
我可以定义一个宏DEFAULTED来代替= default吗?如果它刚刚离开该行
Foo(const Foo& arg);
编译器仍会生成其默认值,还是会抱怨?
struct Foo {
int data;
Foo() = default;
Foo(const Foo& arg) = default;
};
但是我的编译器还没有默认的构造函数。
我可以定义一个宏DEFAULTED来代替= default吗?如果它刚刚离开该行
Foo(const Foo& arg);
编译器仍会生成其默认值,还是会抱怨?