Sdílet prostřednictvím


Chyba kompilátoru C2154

'type': Jako argument pro vnitřní vlastnost typu kompilátoru '__underlying_type' je povolen pouze typ výčtu

Poznámky

Základní typ výčtu můžete získat pouze.

Example

Následující příklad generuje 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

Viz také

underlying_type Třída