1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

next: drop CV_CXX11 conditions

define itself is still here for compatibility
This commit is contained in:
Alexander Alekhin
2018-03-22 14:51:39 +03:00
parent 2b2fa58f97
commit 98c8584b88
18 changed files with 6 additions and 281 deletions
@@ -58,7 +58,6 @@
namespace cv { namespace cuda { namespace device
{
// Function Objects
#ifdef CV_CXX11
template<typename Argument, typename Result> struct unary_function
{
typedef Argument argument_type;
@@ -70,10 +69,6 @@ namespace cv { namespace cuda { namespace device
typedef Argument2 second_argument_type;
typedef Result result_type;
};
#else
template<typename Argument, typename Result> struct unary_function : public std::unary_function<Argument, Result> {};
template<typename Argument1, typename Argument2, typename Result> struct binary_function : public std::binary_function<Argument1, Argument2, Result> {};
#endif
// Arithmetic Operations
template <typename T> struct plus : binary_function<T, T, T>
@@ -417,6 +417,9 @@ Cv64suf;
# undef CV_CXX11
# endif
#endif
#ifndef CV_CXX11
# error "OpenCV 4.x+ requires enabled C++11 support"
#endif
/****************************************************************************************\
@@ -53,9 +53,7 @@
#include "opencv2/core/bufferpool.hpp"
#ifdef CV_CXX11
#include <type_traits>
#endif
namespace cv
{
@@ -984,7 +982,6 @@ public:
*/
template<typename _Tp> explicit Mat(const std::vector<_Tp>& vec, bool copyData=false);
#ifdef CV_CXX11
/** @overload
*/
template<typename _Tp, typename = typename std::enable_if<std::is_arithmetic<_Tp>::value>::type>
@@ -993,7 +990,6 @@ public:
/** @overload
*/
template<typename _Tp> explicit Mat(const std::initializer_list<int> sizes, const std::initializer_list<_Tp> list);
#endif
#ifdef CV_CXX_STD_ARRAY
/** @overload
@@ -2210,10 +2206,8 @@ public:
explicit Mat_(const Point3_<typename DataType<_Tp>::channel_type>& pt, bool copyData=true);
explicit Mat_(const MatCommaInitializer_<_Tp>& commaInitializer);
#ifdef CV_CXX11
Mat_(std::initializer_list<_Tp> values);
explicit Mat_(const std::initializer_list<int> sizes, const std::initializer_list<_Tp> values);
#endif
#ifdef CV_CXX_STD_ARRAY
template <std::size_t _Nm> explicit Mat_(const std::array<_Tp, _Nm>& arr, bool copyData=false);
@@ -574,7 +574,6 @@ Mat::Mat(const std::vector<_Tp>& vec, bool copyData)
Mat((int)vec.size(), 1, traits::Type<_Tp>::value, (uchar*)&vec[0]).copyTo(*this);
}
#ifdef CV_CXX11
template<typename _Tp, typename> inline
Mat::Mat(const std::initializer_list<_Tp> list)
: Mat()
@@ -594,7 +593,6 @@ Mat::Mat(const std::initializer_list<int> sizes, const std::initializer_list<_Tp
CV_Assert(size_total == list.size());
Mat((int)sizes.size(), (int*)sizes.begin(), traits::Type<_Tp>::value, (uchar*)list.begin()).copyTo(*this);
}
#endif
#ifdef CV_CXX_STD_ARRAY
template<typename _Tp, std::size_t _Nm> inline
@@ -1634,7 +1632,6 @@ Mat_<_Tp>::Mat_(const std::vector<_Tp>& vec, bool copyData)
: Mat(vec, copyData)
{}
#ifdef CV_CXX11
template<typename _Tp> inline
Mat_<_Tp>::Mat_(std::initializer_list<_Tp> list)
: Mat(list)
@@ -1644,7 +1641,6 @@ template<typename _Tp> inline
Mat_<_Tp>::Mat_(const std::initializer_list<int> sizes, std::initializer_list<_Tp> list)
: Mat(sizes, list)
{}
#endif
#ifdef CV_CXX_STD_ARRAY
template<typename _Tp> template<std::size_t _Nm> inline
@@ -53,9 +53,7 @@
#include "opencv2/core/traits.hpp"
#include "opencv2/core/saturate.hpp"
#ifdef CV_CXX11
#include <initializer_list>
#endif
namespace cv
{
@@ -141,9 +139,7 @@ public:
_Tp v12, _Tp v13, _Tp v14, _Tp v15); //!< 1x16, 4x4 or 16x1 matrix
explicit Matx(const _Tp* vals); //!< initialize from a plain array
#ifdef CV_CXX11
Matx(std::initializer_list<_Tp>); //!< initialize from an initializer list
#endif
static Matx all(_Tp alpha);
static Matx zeros();
@@ -361,9 +357,7 @@ public:
Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8, _Tp v9, _Tp v10, _Tp v11, _Tp v12, _Tp v13); //!< 14-element vector constructor
explicit Vec(const _Tp* values);
#ifdef CV_CXX11
Vec(std::initializer_list<_Tp>);
#endif
Vec(const Vec<_Tp, cn>& v);
@@ -665,7 +659,6 @@ Matx<_Tp, m, n>::Matx(const _Tp* values)
for( int i = 0; i < channels; i++ ) val[i] = values[i];
}
#ifdef CV_CXX11
template<typename _Tp, int m, int n> inline
Matx<_Tp, m, n>::Matx(std::initializer_list<_Tp> list)
{
@@ -676,7 +669,6 @@ Matx<_Tp, m, n>::Matx(std::initializer_list<_Tp> list)
val[i++] = elem;
}
}
#endif
template<typename _Tp, int m, int n> inline
Matx<_Tp, m, n> Matx<_Tp, m, n>::all(_Tp alpha)
@@ -1019,11 +1011,9 @@ template<typename _Tp, int cn> inline
Vec<_Tp, cn>::Vec(const _Tp* values)
: Matx<_Tp, cn, 1>(values) {}
#ifdef CV_CXX11
template<typename _Tp, int cn> inline
Vec<_Tp, cn>::Vec(std::initializer_list<_Tp> list)
: Matx<_Tp, cn, 1>(list) {}
#endif
template<typename _Tp, int cn> inline
Vec<_Tp, cn>::Vec(const Vec<_Tp, cn>& m)
@@ -56,9 +56,7 @@
#include "opencv2/core.hpp"
#include <ostream>
#ifdef CV_CXX11
#include <functional>
#endif
namespace cv
{
@@ -531,7 +529,6 @@ public:
*/
CV_EXPORTS void parallel_for_(const Range& range, const ParallelLoopBody& body, double nstripes=-1.);
#ifdef CV_CXX11
class ParallelLoopBodyLambdaWrapper : public ParallelLoopBody
{
private:
@@ -551,7 +548,6 @@ inline void parallel_for_(const Range& range, std::function<void(const Range&)>
{
parallel_for_(range, ParallelLoopBodyLambdaWrapper(functor), nstripes);
}
#endif
/////////////////////////////// forEach method of cv::Mat ////////////////////////////
template<typename _Tp, typename Functor> inline