Cannot compile Boost JSON under Visual Studio 2022 with /clr
Hello Boosters, I have a simple file to compile the Boost JSON source (Boost 1.81) to avoid creating a library: #define BOOST_CONTAINER_NO_LIB #include "boost\json\src.hpp" This works fine on X86 and X64 builds, but when I try a .NET /clr compile, I get errors coming out of parser.ipp and a few other places, all of this type: Error C2679 binary '=': no operator found which takes a right-hand operand of type 'boost::json::error_code' (or there is no acceptable conversion) The code producing the error is trying to convert the boost::system::error_code to a std::error_code, via a simple assignment, so clearly relying on a conversion operator. It appears that the conversion to std::error_code is conditionally included based on the BOOST_SYSTEM_HAS_SYSTEM_ERROR macro, but if I manually define this macro I get a whole lot of other errors instead (mainly relating to Mutex). Is this a bug in the library, or a misconfiguration on my part in order to compile correctly for /clr? Thanks in advance Kevin
participants (1)
-
Kevin Frey