Skip to content

add noexcept to default constructors of cv::ocl#19572

Merged
opencv-pushbot merged 1 commit intoopencv:masterfrom
diablodale:fix19571_ocl_noexcept
Feb 20, 2021
Merged

add noexcept to default constructors of cv::ocl#19572
opencv-pushbot merged 1 commit intoopencv:masterfrom
diablodale:fix19571_ocl_noexcept

Conversation

@diablodale
Copy link
Copy Markdown
Contributor

fixes #19571
This is only for OpenCV 4.x. It requires C++11 or newer.

  • follows iso c++ guideline C.44
  • enables default compiler-created constructors to also be noexcept

Pull Request Readiness Checklist

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • The feature is well documented and sample code can be built with the project CMake

@alalek
Copy link
Copy Markdown
Member

alalek commented Feb 20, 2021

Please use CV_NOEXCEPT (to keep code consistent).

BTW, CV_NOEXCEPT exists in 3.4 (but probably this patch should be backported separately due to different set of "ocl" classes).

@diablodale
Copy link
Copy Markdown
Contributor Author

Yes, I'll update 4.x code to use CV_NOEXCEPT. force push soon.

- follows iso c++ guideline C.44
- enables default compiler-created constructors to
  also be noexcept
Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: core category: ocl port/backport done Label for maintainers. Authors of PR can ignore this

Projects

None yet

Development

Successfully merging this pull request may close these issues.

opencl cv::ocl default class constructors missing noexcept; adds difficulty in later use

3 participants