Seems within core/cvdef.h there is a typo within this macro, looking at the relationships between the flags and macros I believe the author's intent was to reference CV_SUBMAT_FLAG instead of CV_MAT_SUBMAT_FLAG as it is undefined. I'm looking to verify this is indeed an issue with others before I submit this defect.