Octave 4.2.2 having ambiguous issue while compiling with c++14

From:

Arun

Subject:

Octave 4.2.2 having ambiguous issue while compiling with c++14

Date:

Mon, 21 Jan 2019 05:09:33 -0600 (CST)

*Recently i upgraded to c++14 because of its advanced features, but i am
facing ambiguous issue with Octave compilation for Range and Complex
variables in my project where i used c++14 to compile ffmpeg,opencv,...etc.
with c++11 i never faced issue with octave 4.0.0 and 4.2.2 but only with
c++14 i am facing issue.
it would be great help if someone provide solution to resolve this issue
*
In file included from /usr/include/octave-4.2.2/octave/Array.h:38:0, from
/usr/include/octave-4.2.2/octave/Sparse.h:37, from
/usr/include/octave-4.2.2/octave/MSparse.h:31, from
/usr/include/octave-4.2.2/octave/MatrixType.h:29, from
/usr/include/octave-4.2.2/octave/mx-base.h:30, from
/usr/include/octave-4.2.2/octave/Matrix.h:32, from
/usr/include/octave-4.2.2/octave/oct.h:30, from
/home/arun/Desktop/proj/media/video.h:20, from
/home/arun/Desktop/proj/media/video.cpp:7:
/usr/include/octave-4.2.2/octave/idx-vector.h:173:26: error: reference to
‘Range’ is ambiguous idx_range_rep (const Range&); ^
/usr/include/octave-4.2.2/octave/idx-vector.h:43:7: note: candidates are:
class Range class Range; ^ In file included from
/usr/local/include/opencv2/core.hpp:58:0, from
/usr/local/include/opencv2/opencv.hpp:52, from
/home/arun/Desktop/proj/media/video.cpp:2:
/usr/local/include/opencv2/core/types.hpp:590:18: note: class cv::Range
class CV_EXPORTS Range ^ In file included from
/usr/include/octave-4.2.2/octave/Array.h:38:0, from
/usr/include/octave-4.2.2/octave/Sparse.h:37, from
/usr/include/octave-4.2.2/octave/MSparse.h:31, from
/usr/include/octave-4.2.2/octave/MatrixType.h:29, from
/usr/include/octave-4.2.2/octave/mx-base.h:30, from
/usr/include/octave-4.2.2/octave/Matrix.h:32, from
/usr/include/octave-4.2.2/octave/oct.h:30, from
/home/arun/Desktop/proj/media/video.h:20, from
/home/arun/Desktop/proj/media/video.cpp:7:
/usr/include/octave-4.2.2/octave/idx-vector.h:206:5: error: reference to
‘Range’ is ambiguous Range unconvert (void) const; ^
/usr/include/octave-4.2.2/octave/idx-vector.h:43:7: note: candidates are:
class Range class Range; ^ In file included from
/usr/local/include/opencv2/core.hpp:58:0, from
/usr/local/include/opencv2/opencv.hpp:52, from
/home/arun/Desktop/proj/media/video.cpp:2:
/usr/local/include/opencv2/core/types.hpp:590:18: note: class cv::Range
class CV_EXPORTS Range ^ In file included from
/usr/include/octave-4.2.2/octave/Array.h:38:0, from
/usr/include/octave-4.2.2/octave/Sparse.h:37, from
/usr/include/octave-4.2.2/octave/MSparse.h:31, from
/usr/include/octave-4.2.2/octave/MatrixType.h:29, from
/usr/include/octave-4.2.2/octave/mx-base.h:30, from
/usr/include/octave-4.2.2/octave/Matrix.h:32, from
/usr/include/octave-4.2.2/octave/oct.h:30, from
/home/arun/Desktop/proj/media/video.h:20, from
/home/arun/Desktop/proj/media/video.cpp:7:
/usr/include/octave-4.2.2/octave/idx-vector.h:511:21: error: reference to
‘Range’ is ambiguous idx_vector (const Range& r) ^
/usr/include/octave-4.2.2/octave/idx-vector.h:43:7: note: candidates are:
class Range class Range; ^ In file included from
/usr/local/include/opencv2/core.hpp:58:0, from
/usr/local/include/opencv2/opencv.hpp:52, from
/home/arun/Desktop/proj/media/video.cpp:2:
/usr/local/include/opencv2/core/types.hpp:590:18: note: class cv::Range
class CV_EXPORTS Range ^ In file included from
/usr/include/octave-4.2.2/octave/Array.h:38:0, from
/usr/include/octave-4.2.2/octave/Sparse.h:37, from
/usr/include/octave-4.2.2/octave/MSparse.h:31, from
/usr/include/octave-4.2.2/octave/MatrixType.h:29, from
/usr/include/octave-4.2.2/octave/mx-base.h:30, from
/usr/include/octave-4.2.2/octave/Matrix.h:32, from
/usr/include/octave-4.2.2/octave/oct.h:30, from
/home/arun/Desktop/proj/media/video.h:20, from
/home/arun/Desktop/proj/media/video.cpp:7:
/usr/include/octave-4.2.2/octave/idx-vector.h:1005:35: error: reference to
‘Range’ is ambiguous double& scalar, Range& range, ^
/usr/include/octave-4.2.2/octave/idx-vector.h:43:7: note: candidates are:
class Range class Range; ^ In file included from
/usr/local/include/opencv2/core.hpp:58:0, from
/usr/local/include/opencv2/opencv.hpp:52, from
/home/arun/Desktop/proj/media/video.cpp:2:
/usr/local/include/opencv2/core/types.hpp:590:18: note: class cv::Range
class CV_EXPORTS Range ^ In file included from
/usr/include/octave-4.2.2/octave/Array.h:38:0, from
/usr/include/octave-4.2.2/octave/Sparse.h:37, from
/usr/include/octave-4.2.2/octave/MSparse.h:31, from
/usr/include/octave-4.2.2/octave/MatrixType.h:29, from
/usr/include/octave-4.2.2/octave/mx-base.h:30, from
/usr/include/octave-4.2.2/octave/Matrix.h:32, from
/usr/include/octave-4.2.2/octave/oct.h:30, from
/home/arun/Desktop/proj/media/video.h:20, from
/home/arun/Desktop/proj/media/video.cpp:7:
/usr/include/octave-4.2.2/octave/idx-vector.h:1005:35: error: ‘Range’ has
not been declared double& scalar, Range& range, ^ In file included from
/usr/include/octave-4.2.2/octave/Array.h:41:0, from
/usr/include/octave-4.2.2/octave/Sparse.h:37, from
/usr/include/octave-4.2.2/octave/MSparse.h:31, from
/usr/include/octave-4.2.2/octave/MatrixType.h:29, from
/usr/include/octave-4.2.2/octave/mx-base.h:30, from
/usr/include/octave-4.2.2/octave/Matrix.h:32, from
/usr/include/octave-4.2.2/octave/oct.h:30, from
/home/arun/Desktop/proj/media/video.h:20, from
/home/arun/Desktop/proj/media/video.cpp:7:
/usr/include/octave-4.2.2/octave/lo-utils.h:71:52: error: reference to
‘Complex’ is ambiguous extern OCTAVE_API bool xtoo_large_for_float (const
Complex& x); ^ In file included from
/usr/include/octave-4.2.2/octave/lo-utils.h:36:0, from
/usr/include/octave-4.2.2/octave/Array.h:41, from
/usr/include/octave-4.2.2/octave/Sparse.h:37, from
/usr/include/octave-4.2.2/octave/MSparse.h:31, from
/usr/include/octave-4.2.2/octave/MatrixType.h:29, from
/usr/include/octave-4.2.2/octave/mx-base.h:30, from
/usr/include/octave-4.2.2/octave/Matrix.h:32, from
/usr/include/octave-4.2.2/octave/oct.h:30, from
/home/arun/Desktop/proj/media/video.h:20, from
/home/arun/Desktop/proj/media/video.cpp:7:
/usr/include/octave-4.2.2/octave/oct-cmplx.h:31:30: note: candidates are:
typedef struct std::complex Complex typedef std::complex Complex; ^ In file
included from /usr/local/include/opencv2/core.hpp:54:0, from
/usr/local/include/opencv2/opencv.hpp:52, from
/home/arun/Desktop/proj/media/video.cpp:2:
/usr/local/include/opencv2/core/base.hpp:658:30: note: template class
cv::Complex template class Complex; ^ In file included from
/usr/include/octave-4.2.2/octave/Array.h:41:0, from
/usr/include/octave-4.2.2/octave/Sparse.h:37, from
/usr/include/octave-4.2.2/octave/MSparse.h:31, from
/usr/include/octave-4.2.2/octave/MatrixType.h:29, from
/usr/include/octave-4.2.2/octave/mx-base.h:30, from
/usr/include/octave-4.2.2/octave/Matrix.h:32, from
/usr/include/octave-4.2.2/octave/oct.h:30, from
/home/arun/Desktop/proj/media/video.h:20, from
/home/arun/Desktop/proj/media/video.cpp:7:
/usr/include/octave-4.2.2/octave/lo-utils.h:99:24: error: reference to
‘Complex’ is ambiguous template <> OCTAVE_API Complex octave_read_value
(std::istream& is); ^ In file included from
/usr/include/octave-4.2.2/octave/lo-utils.h:36:0, from
/usr/include/octave-4.2.2/octave/Array.h:41, from
/usr/include/octave-4.2.2/octave/Sparse.h:37, from
/usr/include/octave-4.2.2/octave/MSparse.h:31, from
/usr/include/octave-4.2.2/octave/MatrixType.h:29, from
/usr/include/octave-4.2.2/octave/mx-base.h:30, from
/usr/include/octave-4.2.2/octave/Matrix.h:32, from
/usr/include/octave-4.2.2/octave/oct.h:30, from
/home/arun/Desktop/proj/media/video.h:20, from
/home/arun/Desktop/proj/media/video.cpp:7:
/usr/include/octave-4.2.2/octave/oct-cmplx.h:31:30: note: candidates are:
typedef struct std::complex Complex typedef std::complex Complex; ^ In file
included from /usr/local/include/opencv2/core.hpp:54:0, from
/usr/local/include/opencv2/opencv.hpp:52, from
/home/arun/Desktop/proj/media/video.cpp:2:
/usr/local/include/opencv2/core/base.hpp:658:30: note: template class
cv::Complex template class Complex; ^ In file included from
/usr/include/octave-4.2.2/octave/Array.h:41:0, from
/usr/include/octave-4.2.2/octave/Sparse.h:37, from
/usr/include/octave-4.2.2/octave/MSparse.h:31, from
/usr/include/octave-4.2.2/octave/MatrixType.h:29, from
/usr/include/octave-4.2.2/octave/mx-base.h:30, from
/usr/include/octave-4.2.2/octave/Matrix.h:32, from
/usr/include/octave-4.2.2/octave/oct.h:30, from
/home/arun/Desktop/proj/media/video.h:20, from
/home/arun/Desktop/proj/media/video.cpp:7:
/usr/include/octave-4.2.2/octave/lo-utils.h:110:8: error: reference to
‘Complex’ is ambiguous inline Complex ^ In file included from
/usr/include/octave-4.2.2/octave/lo-utils.h:36:0, from
/usr/include/octave-4.2.2/octave/Array.h:41, from
/usr/include/octave-4.2.2/octave/Sparse.h:37, from
/usr/include/octave-4.2.2/octave/MSparse.h:31, from
/usr/include/octave-4.2.2/octave/MatrixType.h:29, from
/usr/include/octave-4.2.2/octave/mx-base.h:30, from
/usr/include/octave-4.2.2/octave/Matrix.h:32, from
/usr/include/octave-4.2.2/octave/oct.h:30, from
/home/arun/Desktop/proj/media/video.h:20, from
/home/arun/Desktop/proj/media/video.cpp:7:
/usr/include/octave-4.2.2/octave/oct-cmplx.h:31:30: note: candidates are:
typedef struct std::complex Complex typedef std::complex Complex; ^ In file
included from /usr/local/include/opencv2/core.hpp:54:0, from
/usr/local/include/opencv2/opencv.hpp:52, from
/home/arun/Desktop/proj/media/video.cpp:2:
/usr/local/include/opencv2/core/base.hpp:658:30: note: template class
cv::Complex template class Complex; ^ In file included from
/usr/include/octave-4.2.2/octave/Array.h:41:0, from
/usr/include/octave-4.2.2/octave/Sparse.h:37, from
/usr/include/octave-4.2.2/octave/MSparse.h:31, from
/usr/include/octave-4.2.2/octave/MatrixType.h:29, from
/usr/include/octave-4.2.2/octave/mx-base.h:30, from
/usr/include/octave-4.2.2/octave/Matrix.h:32, from
/usr/include/octave-4.2.2/octave/oct.h:30, from
/home/arun/Desktop/proj/media/video.h:20, from
/home/arun/Desktop/proj/media/video.cpp:7:
/usr/include/octave-4.2.2/octave/lo-utils.h:132:47: error: reference to
‘Complex’ is ambiguous octave_write_complex (std::ostream& os, const
Complex& cval); ^
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html