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 Error C3158

'construct' : destructors and copy constructors are not allowed in a value-type

Value type objects are allocated on the stack and have predefined copy constructors that perform binary copy operations. You cannot define copy constructors so that copying is done differently.

The following sample generates C3158:

#using <mscorlib.dll>
__value class C {
   ~C();   // C3158
   C(const C& c);   // C3158
};
void main() {
}