struct Foo {
int data;
Foo() = default;
Foo(const Foo& arg) = default;
};
But my compiler doesn’t have defaulted constructors yet.
Can I define a macro like DEFAULTED to stand in for = default? If it just left the line as
Foo(const Foo& arg);
would the compiler still generate its default, or would it complain?
Of course you can:
However: Some compilers support parts of C++11, and may set
__cplusplusto201103Leven though they don’t support default constructors.