So what is the difference?
Parentheses only work for non-class types or types with a suitable constructor for the number of arguments in brackets.
, - struct . :
struct {
int a,b;
} aggregate;
int array[2];
Foo() : aggregate{1,2}, array{3,4} {}
, initializer_list, (), . :
std::vector<int> v1;
std::vector<int> v2;
Foo() :
v1(10,2),
v2{10,2}
{}
?
, , , initializer_list; .
, , ; , " ".
, , .