internal compiler error in module wrapping opencv cv::mat
I get internal compiler error trying to compile this module.ixx file. I have tried variations on this and can sometimes get the module to compile, but the external program referencing this module then fails to compile with internal compiler error. Therefore, I'm just showing simpler example. What I'm trying to do is thinly wrap the cv::Mat to shield referencing programs from changes I may want to make.
I'm using /std::c++lateset and scan sources for module dependencies to yes, using VS 2022 current. OpenCV was integrated into the project using vcpkg and is release 4.5.3#3. I've also seen internal compiler errors in similar situations with Boost geometry.
module;
export module Module;
import<opencv2\core\core.hpp>;
import<opencv2\imgproc.hpp>;
namespace m3 {
export {
auto test_mat() {
int height = 10;
int width = 10;
return cv::Mat(height, width, CV_8UC1);
}
}
} // namespace m3