mercredi 1 juin 2016

Struct aggregate initialization vs. default constructor

Given the following initialization of a struct:

void f() {
    Struct s {};
    ...
}

Will this always do aggregate initialization, or will the Struct() constructor be called instead, if it is explicitly defined?

Aucun commentaire:

Enregistrer un commentaire