What are the advantages of "enum class" over simple "enum" once there is std::underlying_type_t?
enum class is aiming to provide type safety, thus eliminating implicit conversion to integer by integral promotion, but once we have std::underlying_type_t the advantage of enum class is not clear to me.
Aucun commentaire:
Enregistrer un commentaire