C++ Logo

std-discussion

Advanced search

Does an enum type have the same size, alignment, and value representation as its underlying type?

From: Brian Bi <bbi5291_at_[hidden]>
Date: Sun, 1 May 2022 20:05:53 -0400
A fundamental type that has an underlying type is required to have the same
size, alignment, and value representation as its underlying type
([basic.fundamental]/6). There doesn't seem to be such a requirement for
enum types. Is that intentional?

-- 
*Brian Bi*

Received on 2022-05-02 00:06:06