Skip to content

add noexcept to default constructors: Mat, UMat, Mat_, MatSize, MatStep #19682

@diablodale

Description

@diablodale

I propose adding noexcept to default constructors of: Mat, UMat, Mat_, MatSize, MatStep
I discovered they were missing it, yet could have it, while I was experimenting with solutions for another issue.
This continues my work I started in the ocl namespace #19571

As this is a new feature, not a bug fix, and requires C++11, this is for the 4.x branch of OpenCV.
Locally tested with all unit tests passing.

System information (version)
  • OpenCV => 4.5.1 eb82ba3
  • Operating System / Platform => All
  • Compiler => All
Detailed description

default constructors of: Mat, UMat, Mat_, MatSize, MatStep
all do not have noexcept. Yet, they are capable of such. Having noexcept (or the macro CV_NOEXCEPT) enables wider and easier use in STL, in derived classes, etc.

Steps to reproduce

Code review. See default constructors for: Mat, UMat, Mat_, MatSize, MatStep

Issue submission checklist
  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues,
    forum.opencv.org, Stack Overflow, etc and have not found solution
  • I updated to latest OpenCV version and the issue is still there

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions