This is pretty much the same question as Does adding enumerators into enum break ABI?, but with enum class
introduced by C++11.
For what I understand by this page I can simply have a stable ABI by defining an underlying type for my enumerative:
enum class Foo : uint32_t
{
x, y, z
}
I would say this works fine, as for instance something like
enum class Foo : uint8_t { x = 257 }
Will not compile.
Am I correct?
Aucun commentaire:
Enregistrer un commentaire