Skip to content

Various improvements in doc, cxx98 compat and java#1927

Merged
fspindle merged 11 commits intolagadic:masterfrom
fspindle:fix_various_doc_cxx98
Mar 15, 2026
Merged

Various improvements in doc, cxx98 compat and java#1927
fspindle merged 11 commits intolagadic:masterfrom
fspindle:fix_various_doc_cxx98

Conversation

@fspindle
Copy link
Contributor

@fspindle fspindle commented Mar 13, 2026

  • Fix warnings in vpDetectorAprilTag.cpp when cxx98 enabled
  • Improve code documentation in vpColVector class
  • Fix doxygen warning around missing code end tag
  • Disable java build when cxx98 is enabled
  • Disable ur_rtde 3rdparty when c++98 is set

Java requires at least cxx11
- vpColVector &operator=(const std::initializer_list<double> &list);

- static vpColVector view(double *raw_data, unsigned int rows);

- static void view(vpColVector &v, double *raw_data, unsigned int rows);
warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
@s-trinh
Copy link
Contributor

s-trinh commented Mar 13, 2026

When doing

- name: Install ur_rtde dependency
run: |
sudo add-apt-repository -y ppa:sdurobotics/ur-rtde
sudo apt-get update
sudo apt install -y librtde librtde-dev libboost-system-dev libboost-thread-dev libboost-program-options-dev

For some reason it looks like it passes -std=c++11 flag to the ViSP build.

See the log:

2026-03-13T14:49:26.0022453Z cd /home/runner/work/visp/visp/build/3rdparty/pugixml-1.14 && /usr/bin/g++  -I/home/runner/work/visp/visp/3rdparty/pugixml-1.14 -I/home/runner/work/visp/visp/build/include -fPIC -O3 -DNDEBUG -std=c++11 -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT 3rdparty/pugixml-1.14/CMakeFiles/visp_pugixml.dir/pugixml.cpp.o -MF CMakeFiles/visp_pugixml.dir/pugixml.cpp.o.d -o CMakeFiles/visp_pugixml.dir/pugixml.cpp.o -c /home/runner/work/visp/visp/3rdparty/pugixml-1.14/pugixml.cpp

With C++98 build:

2026-03-13T16:32:51.0700186Z /home/runner/work/visp/visp/modules/detection/src/tag/vpDetectorAprilTag.cpp:1531:66: error: ‘vpDetectorAprilTag::vpAprilTagFamily’ is not a class or namespace
2026-03-13T16:32:51.0701972Z  1531 |   vpDetectorAprilTag::vpAprilTagFamily res = vpDetectorAprilTag::vpAprilTagFamily::TAG_COUNT;
2026-03-13T16:32:51.0702921Z       |                                                                  ^~~~~~~~~~~~~~~~
2026-03-13T16:32:51.0704653Z /home/runner/work/visp/visp/modules/detection/src/tag/vpDetectorAprilTag.cpp:1535:35: error: ‘vpDetectorAprilTag::vpAprilTagFamily’ is not a class or namespace
2026-03-13T16:32:51.0706239Z  1535 |   while ((i < vpDetectorAprilTag::vpAprilTagFamily::TAG_COUNT) && (!wasFound)) {
2026-03-13T16:32:51.0707010Z       |                                   ^~~~~~~~~~~~~~~~
2026-03-13T16:32:51.0709408Z /home/runner/work/visp/visp/modules/detection/src/tag/vpDetectorAprilTag.cpp: In static member function ‘static std::string vpDetectorAprilTag::getAvailableTagFamily(const std::string&, const std::string&, const std::string&)’:
2026-03-13T16:32:51.0712400Z /home/runner/work/visp/visp/modules/detection/src/tag/vpDetectorAprilTag.cpp:1552:52: error: ‘vpDetectorAprilTag::vpAprilTagFamily’ is not a class or namespace
2026-03-13T16:32:51.0714040Z  1552 |   for (unsigned int i = 0; i < vpDetectorAprilTag::vpAprilTagFamily::TAG_COUNT - 1; ++i) {
2026-03-13T16:32:51.0714873Z       |                                                    ^~~~~~~~~~~~~~~~
2026-03-13T16:32:51.0759843Z /home/runner/work/visp/visp/modules/detection/src/tag/vpDetectorAprilTag.cpp:1556:122: error: ‘vpDetectorAprilTag::vpAprilTagFamily’ is not a class or namespace
2026-03-13T16:32:51.0762651Z  1556 |   vpDetectorAprilTag::vpAprilTagFamily candidate = static_cast<vpDetectorAprilTag::vpAprilTagFamily>(vpDetectorAprilTag::vpAprilTagFamily::TAG_COUNT - 1);
2026-03-13T16:32:51.0764501Z       |                                                                                                                          ^~~~~~~~~~~~~~~~
2026-03-13T16:32:51.0767533Z /home/runner/work/visp/visp/modules/detection/src/tag/vpDetectorAprilTag.cpp: In static member function ‘static vpDetectorAprilTag::vpPoseEstimationMethod vpDetectorAprilTag::poseMethodFromString(const std::string&)’:
2026-03-13T16:32:51.0770767Z /home/runner/work/visp/visp/modules/detection/src/tag/vpDetectorAprilTag.cpp:1595:72: error: ‘vpDetectorAprilTag::vpPoseEstimationMethod’ is not a class or namespace
2026-03-13T16:32:51.0772617Z  1595 |   vpDetectorAprilTag::vpPoseEstimationMethod res = vpDetectorAprilTag::vpPoseEstimationMethod::POSE_COUNT;
2026-03-13T16:32:51.0773680Z       |                                                                        ^~~~~~~~~~~~~~~~~~~~~~
2026-03-13T16:32:51.0775479Z /home/runner/work/visp/visp/modules/detection/src/tag/vpDetectorAprilTag.cpp:1599:35: error: ‘vpDetectorAprilTag::vpPoseEstimationMethod’ is not a class or namespace
2026-03-13T16:32:51.0777142Z  1599 |   while ((i < vpDetectorAprilTag::vpPoseEstimationMethod::POSE_COUNT) && (!wasFound)) {
2026-03-13T16:32:51.0807626Z       |                                   ^~~~~~~~~~~~~~~~~~~~~~
2026-03-13T16:32:51.0810088Z /home/runner/work/visp/visp/modules/detection/src/tag/vpDetectorAprilTag.cpp: In static member function ‘static std::string vpDetectorAprilTag::getAvailablePoseMethod(const std::string&, const std::string&, const std::string&)’:
2026-03-13T16:32:51.0812997Z /home/runner/work/visp/visp/modules/detection/src/tag/vpDetectorAprilTag.cpp:1616:52: error: ‘vpDetectorAprilTag::vpPoseEstimationMethod’ is not a class or namespace
2026-03-13T16:32:51.0814949Z  1616 |   for (unsigned int i = 0; i < vpDetectorAprilTag::vpPoseEstimationMethod::POSE_COUNT - 1; ++i) {
2026-03-13T16:32:51.0815783Z       |                                                    ^~~~~~~~~~~~~~~~~~~~~~
2026-03-13T16:32:51.0817655Z /home/runner/work/visp/visp/modules/detection/src/tag/vpDetectorAprilTag.cpp:1620:134: error: ‘vpDetectorAprilTag::vpPoseEstimationMethod’ is not a class or namespace
2026-03-13T16:32:51.0820192Z  1620 |   vpDetectorAprilTag::vpPoseEstimationMethod candidate = static_cast<vpDetectorAprilTag::vpPoseEstimationMethod>(vpDetectorAprilTag::vpPoseEstimationMethod::POSE_COUNT - 1);
2026-03-13T16:32:51.0821890Z       |                                                                                                                                      ^~~~~~~~~~~~~~~~~~~~~~
2026-03-13T16:32:51.2220198Z make[2]: *** [modules/detection/CMakeFiles/visp_detection.dir/build.make:138: modules/detection/CMakeFiles/visp_detection.dir/src/tag/vpDetectorAprilTag.cpp.o] Error 1

The C++98 build on GHA is broken for some time.

@s-trinh
Copy link
Contributor

s-trinh commented Mar 13, 2026

Same here, C++98 logs give plenty of std=c++11 on C++98 config:

gcc:

image

clang:

image

@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.41%. Comparing base (572d511) to head (41a3fb2).
⚠️ Report is 10 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1927      +/-   ##
==========================================
- Coverage   48.44%   48.41%   -0.03%     
==========================================
  Files         532      532              
  Lines       69328    69328              
  Branches    32424    32424              
==========================================
- Hits        33584    33566      -18     
- Misses      25028    31515    +6487     
+ Partials    10716     4247    -6469     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

 In file included from visp/modules/tracker/mbt/include/visp3/mbt/vpMbDepthDenseTracker.h:41,

                 from visp/modules/tracker/mbt/include/visp3/mbt/vpMbGenericTracker.h:43,

                 from visp/modules/tracker/mbt/src/vpMbGenericTracker.cpp:34:

visp/modules/tracker/mbt/include/visp3/mbt/vpMbtTukeyEstimator.h:138:52: warning: ‘template<class _Arg1, class _Arg2, class _Result> struct std::binary_function’ is deprecated [-Wdeprecated-declarations]

  138 | template <typename T> struct AbsDiff : public std::binary_function<T, T, T>

      |                                                    ^~~~~~~~~~~~~~~

In file included from /usr/include/c++/13/string:49,

                 from /usr/include/c++/13/bitset:52,

                 from /usr/include/c++/13/regex:40,

                 from visp-build/include/visp3/core/vpConfig.h:639,

                 from visp/modules/tracker/mbt/include/visp3/mbt/vpMbGenericTracker.h:42:

/usr/include/c++/13/bits/stl_function.h:131:12: note: declared here

  131 |     struct binary_function

      |            ^~~~~~~~~~~~~~~
…Closes 1929

ur_rtde 3rdparty is forcing the standard to C++11.
This could be seen in /usr/lib/x86_64-linux-gnu/cmake/ur_rtde/ur_rtdeBuildConfig.cmake where we can found
if ("${CMAKE_CXX_STANDARD}" STREQUAL "")
    set(CMAKE_CXX_STANDARD 11)
    set(CMAKE_CXX_STANDARD_REQUIRED ON)
elseif(${CMAKE_CXX_STANDARD} LESS_EQUAL 11 OR ${CMAKE_CXX_STANDARD} EQUAL 98 )
    set(CMAKE_CXX_STANDARD 11)
    set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif()
…1930

Vicon SDK requires at least c++11 standard.
There is the build issue when c++98 is set and VISP_HAVE_VICON is defined
In file included from visp/modules/sensor/src/mocap/vpMocapVicon.cpp:44:
visp-ws/3rdparty/vicon/20230413_145507h/Release/Linux64/DataStreamClient.h:43:10: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
   43 |     std::shared_ptr< std::vector< unsigned char > > m_Data;
      |          ^~~~~~~~~~
@fspindle fspindle merged commit ea0b13a into lagadic:master Mar 15, 2026
87 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants