-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Closed
Description
Describe the feature and motivation
A Folly user has noticed that Mat(Mat&&) is noexcept(false). This means that it gets the "vector pessimization" with std::vector (making copies on reallocation rather than moving), and it can't be put into a folly::fbvector<cv::Mat> at all (facebook/folly#1821), because Folly actually asserts at compile time that moving can be done without throwing exceptions.
Looking at the code, I don't see any obvious reason Mat(Mat&&) couldn't just be replaced with Mat(Mat&&) CV_NOEXCEPT. But there might be a subtle reason? If so, it would be great to document that reason with a code comment on the declaration and/or definition of the throwing move constructor, so that people don't ask this question again. :)
Additional context
No response
Reactions are currently unavailable