Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace cv
- {
- //matrix object derived from cv::Mat
- class Mvbl_Mat final: public Mat
- {
- public:
- //constructors
- Mvbl_Mat(){};
- Mvbl_Mat(int rows, int cols, int type, const Scalar &s):Mat(rows, cols, type, s){}
- //destructor
- ~Mvbl_Mat(){};
- //move constructor
- Mvbl_Mat(Mvbl_Mat && other) noexcept
- {
- this->data=other.data;
- other.data=nullptr;
- }
- //move assignment operator
- Mvbl_Mat & operator=(Mvbl_Mat && other)
- {
- this->data=other.data;
- other.data=nullptr;
- return *this;
- }
- };
- }
- namespace std
- {
- //specialization of std::move for cv::Mvbl_Mat
- template<>
- constexpr typename std::remove_reference<cv::Mvbl_Mat>::type&&
- move(cv::Mvbl_Mat&& __t)
- {
- return static_cast<typename std::remove_reference<cv::Mvbl_Mat>::type&&>(__t);
- }
- }
Add Comment
Please, Sign In to add comment