In general, I've heard it's good practice to use the explicit keyword on constructors with a single argument. However, as of C++11, constructors with more than one argument can be used for implicit conversions. As such, is it good practice to apply the explicit keyword to ALL constructors of > 0 arguments?
Aucun commentaire:
Enregistrer un commentaire