Incorrect declaration order in features2d.hpp (Bug #746)
Description
clang++ spits out the following error when trying to compile. It then stops because there are too many such errors.
The fix should be easy - just reorder the header file.
- ERROR #####
In file included from /home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/opencv.hpp:53:
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:1306:84: error: use of default argument to function 'Params' that is declared later in class 'Params'
GoodFeaturesToTrackDetector( const GoodFeaturesToTrackDetector::Params& params=GoodFeaturesToTrackDetector::Params() );
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:1293:32: note: default argument declared here
Params( int maxCorners=1000, double qualityLevel=0.01, double minDistance=1.,
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:1306:84: error: use of default argument to function 'Params' that is declared later in class 'Params'
GoodFeaturesToTrackDetector( const GoodFeaturesToTrackDetector::Params& params=GoodFeaturesToTrackDetector::Params() );
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:1293:58: note: default argument declared here
Params( int maxCorners=1000, double qualityLevel=0.01, double minDistance=1.,
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:1306:84: error: use of default argument to function 'Params' that is declared later in class 'Params'
GoodFeaturesToTrackDetector( const GoodFeaturesToTrackDetector::Params& params=GoodFeaturesToTrackDetector::Params() );
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:1293:83: note: default argument declared here
Params( int maxCorners=1000, double qualityLevel=0.01, double minDistance=1.,
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:1306:84: error: use of default argument to function 'Params' that is declared later in class 'Params'
GoodFeaturesToTrackDetector( const GoodFeaturesToTrackDetector::Params& params=GoodFeaturesToTrackDetector::Params() );
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:1294:31: note: default argument declared here
int blockSize=3, bool useHarrisDetector=false, double k=0.04 );
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:1306:84: error: use of default argument to function 'Params' that is declared later in class 'Params'
GoodFeaturesToTrackDetector( const GoodFeaturesToTrackDetector::Params& params=GoodFeaturesToTrackDetector::Params() );
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:1294:57: note: default argument declared here
int blockSize=3, bool useHarrisDetector=false, double k=0.04 );
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:1306:84: error: use of default argument to function 'Params' that is declared later in class 'Params'
GoodFeaturesToTrackDetector( const GoodFeaturesToTrackDetector::Params& params=GoodFeaturesToTrackDetector::Params() );
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:1294:73: note: default argument declared here
int blockSize=3, bool useHarrisDetector=false, double k=0.04 );
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:1399:70: error: use of default argument to function 'Params' that is declared later in class 'Params'
DenseFeatureDetector( const DenseFeatureDetector::Params& params=DenseFeatureDetector::Params() );
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:1386:40: note: default argument declared here
Params( float initFeatureScale=1.f, int featureScaleLevels=1, float featureScaleMul=0.1f,
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:1399:70: error: use of default argument to function 'Params' that is declared later in class 'Params'
DenseFeatureDetector( const DenseFeatureDetector::Params& params=DenseFeatureDetector::Params() );
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:1386:68: note: default argument declared here
Params( float initFeatureScale=1.f, int featureScaleLevels=1, float featureScaleMul=0.1f,
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:1399:70: error: use of default argument to function 'Params' that is declared later in class 'Params'
DenseFeatureDetector( const DenseFeatureDetector::Params& params=DenseFeatureDetector::Params() );
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:1386:93: note: default argument declared here
Params( float initFeatureScale=1.f, int featureScaleLevels=1, float featureScaleMul=0.1f,
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:1399:70: error: use of default argument to function 'Params' that is declared later in class 'Params'
DenseFeatureDetector( const DenseFeatureDetector::Params& params=DenseFeatureDetector::Params() );
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:1387:32: note: default argument declared here
int initXyStep=6, int initImgBound=0, bool varyXyStepWithScale=true, bool varyImgBoundWithScale=false );
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:1399:70: error: use of default argument to function 'Params' that is declared later in class 'Params'
DenseFeatureDetector( const DenseFeatureDetector::Params& params=DenseFeatureDetector::Params() );
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:1387:52: note: default argument declared here
int initXyStep=6, int initImgBound=0, bool varyXyStepWithScale=true, bool varyImgBoundWithScale=false );
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:1399:70: error: use of default argument to function 'Params' that is declared later in class 'Params'
DenseFeatureDetector( const DenseFeatureDetector::Params& params=DenseFeatureDetector::Params() );
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:1387:80: note: default argument declared here
int initXyStep=6, int initImgBound=0, bool varyXyStepWithScale=true, bool varyImgBoundWithScale=false );
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:1399:70: error: use of default argument to function 'Params' that is declared later in class 'Params'
DenseFeatureDetector( const DenseFeatureDetector::Params& params=DenseFeatureDetector::Params() );
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:1387:113: note: default argument declared here
int initXyStep=6, int initImgBound=0, bool varyXyStepWithScale=true, bool varyImgBoundWithScale=false );
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:2463:51: error: use of default argument to function 'Params' that is declared later in class 'Params'
OneWayDescriptorMatcher( const Params& params=Params() );
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:2447:33: note: default argument declared here
Params( int poseCount = POSE_COUNT,
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:2463:51: error: use of default argument to function 'Params' that is declared later in class 'Params'
OneWayDescriptorMatcher( const Params& params=Params() );
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:2448:34: note: default argument declared here
Size patchSize = Size(PATCH_WIDTH, PATCH_HEIGHT),
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:2463:51: error: use of default argument to function 'Params' that is declared later in class 'Params'
OneWayDescriptorMatcher( const Params& params=Params() );
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:2449:38: note: default argument declared here
string pcaFilename = string(),
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:2463:51: error: use of default argument to function 'Params' that is declared later in class 'Params'
OneWayDescriptorMatcher( const Params& params=Params() );
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:2450:36: note: default argument declared here
string trainPath = string(), string trainImagesList = string(),
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:2463:51: error: use of default argument to function 'Params' that is declared later in class 'Params'
OneWayDescriptorMatcher( const Params& params=Params() );
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:2450:71: note: default argument declared here
string trainPath = string(), string trainImagesList = string(),
^
/home/atom/work/ijs/calibration/../ocv/lib/include/opencv2/features2d/features2d.hpp:2463:51: error: use of default argument to function 'Params' that is declared later in class 'Params'
OneWayDescriptorMatcher( const Params& params=Params() );
Associated revisions
Merge pull request #746 from jet47:fix-gpu-compilation
History
Updated by Maria Dimashova about 14 years ago
Unclear the error message and a reason of incorrect declarations order in features2d.hpp. Сould you send a patch? I don't use clang++ compiler, moreover OpenCV does not support clang++.
Updated by Gašper Ažman about 14 years ago
Yeah, sure, I'll send a patch. Even if OpenCV doesn't support compiling with clang, it could at least support other applications that compile with clang via headers that clang can swallow.
Give me a few days though, I'm super busy with a project. I'll get around to it though. Any particular repo version you want me to do a patch against?
Updated by Maria Dimashova about 14 years ago
Yes, for r4283 please.
Updated by Alexander Shishkov about 13 years ago
- Description changed from clang++ spits out the following error when trying to compile. It then stops b... to clang++ spits out the following error when trying to compile. It then stops b... More
Updated by Alexander Shishkov almost 13 years ago
- Target version deleted ()
Updated by Alexander Shishkov almost 13 years ago
- Assignee deleted (
Maria Dimashova)
Updated by Maria Dimashova almost 13 years ago
- Assignee set to Maria Dimashova
Updated by Maria Dimashova almost 13 years ago
Thanks, the problem isn't reproduced on r7730.
- Status changed from Open to Cancelled
Updated by Alexander Shishkov almost 13 years ago
- Target version set to 2.4.0