Compiler Error C3382
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at Compiler Error C3382.
sizeof' is not supported with /clr:safe
The output file of a /clr:safe compilation is a file that is verifiably type safe, and sizeof is not supported because the return value of the sizeof operator is size_t, whose size varies depending on the operating system.
For more information, see,
The following sample generates C3382.
// C3382.cpp
// compile with: /clr:safe
int main() {
sizeof( char ); // C3382
}
Show: