What is the correct way of instantiating Bar with its default constructor?
1)
struct Foo { Bar bar; };
2)
struct Foo { Bar bar{}; };
3)
struct Foo { Bar bar; Foo : bar(Bar()) {} };
4)
?
Aucun commentaire:
Enregistrer un commentaire