Commit 8b2122e1 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #12174 from alalek:dnn_move_range_ostream_operator

parents f16f818f a56b2215
...@@ -269,6 +269,11 @@ static inline std::ostream& operator << (std::ostream& out, const MatSize& msize ...@@ -269,6 +269,11 @@ static inline std::ostream& operator << (std::ostream& out, const MatSize& msize
return out; return out;
} }
static inline std::ostream &operator<< (std::ostream &s, cv::Range &r)
{
return s << "[" << r.start << " : " << r.end << ")";
}
} // cv } // cv
#ifdef _MSC_VER #ifdef _MSC_VER
......
...@@ -42,8 +42,8 @@ ...@@ -42,8 +42,8 @@
#ifndef OPENCV_DNN_DNN_SHAPE_UTILS_HPP #ifndef OPENCV_DNN_DNN_SHAPE_UTILS_HPP
#define OPENCV_DNN_DNN_SHAPE_UTILS_HPP #define OPENCV_DNN_DNN_SHAPE_UTILS_HPP
#include <opencv2/core.hpp> #include <opencv2/dnn/dnn.hpp>
#include <opencv2/core/types_c.h> #include <opencv2/core/types_c.h> // CV_MAX_DIM
#include <iostream> #include <iostream>
#include <ostream> #include <ostream>
#include <sstream> #include <sstream>
...@@ -52,12 +52,6 @@ namespace cv { ...@@ -52,12 +52,6 @@ namespace cv {
namespace dnn { namespace dnn {
CV__DNN_EXPERIMENTAL_NS_BEGIN CV__DNN_EXPERIMENTAL_NS_BEGIN
//Useful shortcut
inline std::ostream &operator<< (std::ostream &s, cv::Range &r)
{
return s << "[" << r.start << ", " << r.end << ")";
}
//Slicing //Slicing
struct _Range : public cv::Range struct _Range : public cv::Range
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment