Teilen über


Compilerfehler C2762

'class' : Ungültiger Ausdruck als Vorlagenargument für 'Argument'

Bemerkungen

Bei Verwendung von /Za konvertiert der Compiler kein Integral in einen Zeiger.

Beispiel

Im folgenden Beispiel wird C2762 generiert:

// C2762.cpp
// compile with: /Za
template<typename T, T *pT>
class X2 {};

void f2() {
   X2<int, 0> x21;   // C2762
   // try the following line instead
   // X2<int, static_cast<int *>(0)> x22;
}