vendredi 29 juillet 2016

C++11: Default constructor: Implicit or Excplicit?

When am I supposed to use the default keyword in C++11?

Is it now considered bad to write

struct Foo {

};

and one should write

struct Foo {

  Foo() = default;


};

?

Aucun commentaire:

Enregistrer un commentaire