NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Compiler Warning (level 1) C4420

'operator' : operator not available, using 'operator' instead; run-time checking may be compromised

This warning is generated when you use the /RTCv (vector new/delete checking) and when no vector form is found. In this case, the non-vector form is used.

In order for /RTCv to work correctly, the compiler should always call the vector form of new/delete if the vector syntax was used.

The following sample program shows how C4420 warnings are generated and avoided,

// Test for direct use of global new/delete
void func1() {
   int * pi = new int[10];      // warning

   delete [] pi;            // warning
}

// Test for use on class; class has vec dtor helper
struct s1 {
   virtual ~s1() {};
};

void func2() {
   s1 *ps1 = new s1[10];      // warning

   delete [] ps1;
}                        // warning  with message extensions

// Add a placement vector new; should still get warning
void *operator new[]( size_t s, int op1, int op2 );
void *operator new( size_t s, int op1 );

void func3() {
   int * pi = new (1) int[10];   // warning

   delete [] pi;            // warning
}