The constructor for an InputOutputArray takes a const cv::Mat&in the constructor, meaning this compiles without any warnings or errors.
Why does the InputOutputArray take a const Mat reference. I understand why the InputArray takes a const reference, but an OutputArray really should not
void this_shouldnt_compile(const cv::Mat& mat) {
// const, so the header should not be modifiable
// but the data is
putText(mat, "some text", cvPoint(0,10),
FONT_HERSHEY_COMPLEX_SMALL, 0.8,
cvScalar({0,255,0}), 1, CV_AA);
}