When initializing member variables in a constructor you can do it in these two different ways, using braces or parentheses:
class some_class {
some_class(): foo{<value>}, bar(<value>) {}
T foo;
T bar;
};
Is there a functional difference between these two initialization methods, and if so, which one should I opt to use?
Aucun commentaire:
Enregistrer un commentaire