Initialising any member with ()
performs value initialisation.
Initialising any class type with a default constructor with {}
performs value initialisation.
Initialising any other aggregate type (including arrays) with {}
performs list initialisation, and is equivalent to initialising each of the aggregate's members with {}
.
Initialising any reference type with {}
constructs a temporary object, which is initialised from {}
, and binds the reference to that temporary.
Initialising any other type with {}
performs value initialisation.
Therefore, for pretty much all types, initialisation from {}
will give the same result as value initialisation. You cannot have arrays of references, so those cannot be an exception. You might be able to construct arrays of aggregate class types without a default constructor, but compilers are not in agreement on the exact rules. But to get back to your question, all these corner cases do not really matter for you: for your specific array element type, they have the exact same effect.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…