diff --git a/modules/core/include/opencv2/core/cvstd.inl.hpp b/modules/core/include/opencv2/core/cvstd.inl.hpp index 631fe94e1a..ed37cacb30 100644 --- a/modules/core/include/opencv2/core/cvstd.inl.hpp +++ b/modules/core/include/opencv2/core/cvstd.inl.hpp @@ -269,6 +269,11 @@ static inline std::ostream& operator << (std::ostream& out, const MatSize& msize return out; } +static inline std::ostream &operator<< (std::ostream &s, cv::Range &r) +{ + return s << "[" << r.start << " : " << r.end << ")"; +} + } // cv #ifdef _MSC_VER diff --git a/modules/dnn/include/opencv2/dnn/shape_utils.hpp b/modules/dnn/include/opencv2/dnn/shape_utils.hpp index 953a437dc2..64811d8184 100644 --- a/modules/dnn/include/opencv2/dnn/shape_utils.hpp +++ b/modules/dnn/include/opencv2/dnn/shape_utils.hpp @@ -42,8 +42,8 @@ #ifndef OPENCV_DNN_DNN_SHAPE_UTILS_HPP #define OPENCV_DNN_DNN_SHAPE_UTILS_HPP -#include -#include +#include +#include // CV_MAX_DIM #include #include #include @@ -52,12 +52,6 @@ namespace cv { namespace dnn { CV__DNN_EXPERIMENTAL_NS_BEGIN -//Useful shortcut -inline std::ostream &operator<< (std::ostream &s, cv::Range &r) -{ - return s << "[" << r.start << ", " << r.end << ")"; -} - //Slicing struct _Range : public cv::Range