I am trying to write a managed C++ (aka C++/CLI) library that links to a third-party native C++ library. The third-party library's header files contain constructor definitions that use the nullptr
keyword. My managed project fails to compile because the managed compiler defines nullptr
to mean the managed null reference, whereas the third-party uses it to mean the native/un-managed null pointer. How can I work around this problem without modifying the third-party library's header file?
For reference on nullptr
vs __nullptr
, see: https://msdn.microsoft.com/en-us/library/4ex65770.aspx