Compilerfehler C2716

'operator new' ordnet Werttypen im C++-Heap zu; verwenden Sie '__nogc new type'

Die Syntax einer Objektinstanziierung war falsch.

C2716 ist nur mit /clr:oldSyntax erreichbar.

Im folgenden Beispiel wird C2716 generiert:

// C2716.cpp
// compile with: /clr:oldSyntax
#using <mscorlib.dll>
__value struct V {};

int main() {
   V *pV = new V;   // C2716
   V *pV1 = __nogc new V;   // OK
}