Kompilatorfel C2762

"class" : ogiltigt uttryck som ett mallargument för "argument"

Anmärkningar

När du använder /Za konverterar kompilatorn inte en integral till en pekare.

Exempel

I följande exempel genereras C2762:

// 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;
}