diff --git a/modules/vision/include/visp3/vision/vpPoseFeatures.h b/modules/vision/include/visp3/vision/vpPoseFeatures.h index 2e4324bc48..7428e422c5 100644 --- a/modules/vision/include/visp3/vision/vpPoseFeatures.h +++ b/modules/vision/include/visp3/vision/vpPoseFeatures.h @@ -41,7 +41,7 @@ #include -#ifdef VISP_HAVE_MODULE_VISUAL_FEATURES +#if defined(VISP_HAVE_MODULE_VISUAL_FEATURES) && (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) #include #include @@ -60,8 +60,6 @@ #include #include - -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) #include #ifndef DOXYGEN_SHOULD_SKIP_THIS @@ -384,7 +382,6 @@ class vpPoseSpecificFeatureTemplateObject : public vpPoseSpecificFeature } }; #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS -#endif // (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) /*! * \class vpPoseFeatures @@ -494,7 +491,6 @@ class VISP_EXPORT vpPoseFeatures */ void addFeatureSegment(vpPoint &, vpPoint &); -#if ((__cplusplus >= 201103L) || (defined(_MSVC_LANG) && (_MSVC_LANG >= 201103L))) // Check if cxx11 or higher /*! * Add a specific feature for the pose computation. */ @@ -506,7 +502,6 @@ class VISP_EXPORT vpPoseFeatures */ template void addSpecificFeature(ObjType *obj, RetType(ObjType:: *fct_ptr)(ArgsFunc...), Args &&...args); -#endif /*! * Clear all the features @@ -666,7 +661,6 @@ class VISP_EXPORT vpPoseFeatures void computePoseRobustVVS(vpHomogeneousMatrix &cMo); }; -#if ((__cplusplus >= 201103L) || (defined(_MSVC_LANG) && (_MSVC_LANG >= 201103L))) // Check if cxx11 or higher /*! * Add a specific feature for the pose computation. * @@ -813,6 +807,5 @@ void vpPoseFeatures::addSpecificFeature(ObjType *obj, RetType(ObjType:: *fct_ptr m_maxSize = static_cast(m_featureSpecific_list.size()); } #endif -#endif //#ifdef VISP_HAVE_MODULE_VISUAL_FEATURES #endif diff --git a/modules/vision/src/pose-estimation/vpPoseFeatures.cpp b/modules/vision/src/pose-estimation/vpPoseFeatures.cpp index 958bf2b998..113fd30b2c 100644 --- a/modules/vision/src/pose-estimation/vpPoseFeatures.cpp +++ b/modules/vision/src/pose-estimation/vpPoseFeatures.cpp @@ -32,7 +32,7 @@ */ #include -#ifdef VISP_HAVE_MODULE_VISUAL_FEATURES +#if defined(VISP_HAVE_MODULE_VISUAL_FEATURES) && (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) vpPoseFeatures::vpPoseFeatures() : m_maxSize(0), m_totalSize(0), m_vvsIterMax(200), m_lambda(1.0), m_verbose(false), m_computeCovariance(false), @@ -81,11 +81,9 @@ void vpPoseFeatures::clear() delete m_featureSegment_DuoPoints_list[(unsigned int)i].desiredFeature; m_featureSegment_DuoPoints_list.clear(); -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) for (int i = (int)m_featureSpecific_list.size() - 1; i >= 0; i--) delete m_featureSpecific_list[(unsigned int)i]; m_featureSpecific_list.clear(); -#endif m_maxSize = 0; m_totalSize = 0; @@ -305,14 +303,12 @@ void vpPoseFeatures::error_and_interaction(vpHomogeneousMatrix &cMo, vpColVector L.stack(fs.interaction()); } -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) //--------------Specific Feature-------------- if (i < m_featureSpecific_list.size()) { m_featureSpecific_list[i]->createCurrent(cMo); err.stack(m_featureSpecific_list[i]->error()); L.stack(m_featureSpecific_list[i]->currentInteraction()); } -#endif } } @@ -466,5 +462,7 @@ void vpPoseFeatures::computePoseRobustVVS(vpHomogeneousMatrix &cMo) throw; } } - -#endif //#ifdef VISP_HAVE_MODULE_VISUAL_FEATURES +#elif !defined(VISP_BUILD_SHARED_LIBS) +// Work around to avoid warning: libvisp_vision.a(vpPoseFeatures.cpp.o) has no symbols +void dummy_vpPoseFeatures() { }; +#endif