In VS 2012, I’m getting error C4965 (Implizites Boxing mit ganzer Zahl 0. Verwenden Sie “nullptr” oder eine explizite Umwandlung), when passing 0 where Platform::Object^ is expected. The intention of the code is indeed to pass the integer value 0, not a null reference. Apparently, in C++/CLI etc., there is a __box keyword that can be used, but this is not recognized by the C++/CX compiler.
So: what’s the proper way to suppress this warning, and to create a boxed WinRT integer?
According to MSDN, you should use explicit boxing. It suggests
… so you’re making clear it is not nullptr.
In your case, this would probably be: