Use MSVC 2017 compatible syntax
Unfortunately C++ struct's designated initializer syntax is not supported in VS 2017 compiler,
so use the traditional initializer syntax.
MODIFY
src_cpp/ocvrs_common.hpp
src_cpp/ocvrs_common.hpp
@@ -40,11 +40,11 @@ struct Result_void {
};
template<typename T> inline Result<T> Ok(T result) {
- return Result<T> { .error_code = 0, .error_msg = 0, .result = result };
+ return Result<T> { 0, 0, result };
}
inline Result_void Ok() {
- return Result_void { .error_code = 0, .error_msg = 0 };
+ return Result_void { 0, 0 };
}
template<typename T> inline T Err(int code, const char* msg) {

Use MSVC 2017 compatible syntax

Unfortunately C++ struct's designated initializer syntax is not supported in VS 2017 compiler,
so use the traditional initializer syntax.
https://devblogs.microsoft.com/cppblog/c20-features-and-fixes-in-vs-2019-16-1-through-16-6/