and setting the /std:c++20 compiler flag and also /Zc:__cplusplus solves the problem.
The /Zc:__cplusplus flag instructs cl.exe to set the correct standard version to the __cplusplus macro. If that flag does not get used the __cplusplus macro will default to 199711L (c++11). kind of dumb that it works his way but it is Microsoft that made it.
First error is
startig at line 55 in Supervision.cpp you have the following code.
I am not that proficient in C code bit I am guessing that the use of
=
in the initialize requires c++20.So I add
/std:c++20
to the command line arguments for cl.exe and then I get the next error.openzwave\cpp\src\Utils.cpp(170): error C2440: 'static_cast': cannot convert from '_Ostr' to 'std::ostringstream &'
and starting at line 167 in Utils .cpp you have the following code
I do want to mention that when I do not set the compiler flag to c++20 cl.exe defaults to c++14 and Utils.cpp compiles just fine
changing the code in Utils.cpp to read
and setting the
/std:c++20
compiler flag and also/Zc:__cplusplus
solves the problem.The
/Zc:__cplusplus
flag instructs cl.exe to set the correct standard version to the__cplusplus
macro. If that flag does not get used the__cplusplus
macro will default to 199711L (c++11). kind of dumb that it works his way but it is Microsoft that made it.