Nóta
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as shíniú isteach nó eolairí a athrú.
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as eolairí a athrú.
'type': only enumeration type is allowed as an argument to compiler intrinsic type trait '__underlying_type'
Remarks
You can only get the underlying type of an enumeration type.
Example
The following example generates C2154:
// C2154.cpp
// compile with: /c
struct S {};
enum E {};
enum class EC {};
__underlying_type(S) s; // C2154
__underlying_type(int) i; // C2154
__underlying_type(E) e; // OK
__underlying_type(EC) ec; // OK