I am trying to understand @bolov's first accepted answer to the question Remote default constructor. Objects can still be created ... sometimes [1]
I think I found an error there, and so he messed up the whole explanation.
@bolov explains why this SUCCEED code compiles in C ++ 11:
Scenario A
struct foo {
foo() = delete;
};
// All bellow OK (no errors, no warnings)
foo f = foo{};
foo f = {};
foo f{}; // will use only this from now on.
And why is this FAILS code compiled in C ++ 11:
Script c
struct foo {
foo() = delete;
foo(int) {};
};
foo f{};
He says that the fact is that the first foo is an aggregate and the second foo is not an aggregate.
Then it produces an excerpt from cppreference:
Effects of initializing a list of an object of type T: ...
, foo f {}; A . . ++ 11 ( # 3337, ) :
- T :
, foo f {}; A , DELETED , .