File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -54,13 +54,15 @@ template<class T, T v> struct int_const { // integral_constant
5454typedef int_const<bool ,true > ttype; // true_type
5555typedef int_const<bool ,false > ftype; // false_type
5656
57- template <class T , class U > struct same_as : ftype {};
58- template <class T > struct same_as <T, T> : ttype {}; // is_same
59-
57+ template <class T , class U > struct same_as : ftype {};
58+ template <class T > struct same_as <T, T> : ttype {}; // is_same
6059
6160
6261template <typename _Tp> struct is_norm2_type :
63- int_const<bool , _Tp(-1 ) < _Tp(0 ) && !same_as<_Tp, char >::value> {};
62+ int_const<bool , !same_as<_Tp, char >::value
63+ && !same_as<_Tp, uchar>::value
64+ && !same_as<_Tp, ushort>::value
65+ && !same_as<_Tp, uint>::value>{};
6466
6567template <typename _Tp, int cn> static inline typename iftype< is_norm2_type<_Tp>::value, _Tp >::
6668 type norm2 (cv::Vec<_Tp, cn> a, cv::Vec<_Tp, cn> b) { return (a - b).dot (a - b); }
You can’t perform that action at this time.
0 commit comments