Skip to content

Commit

Permalink
Set cxx11 standard as minimal required standard
Browse files Browse the repository at this point in the history
- remove all the code that was specialized for cxx98 that is no more supported
  • Loading branch information
fspindle committed Oct 28, 2023
1 parent 549fb2c commit 66fab3a
Show file tree
Hide file tree
Showing 186 changed files with 3,458 additions and 3,793 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ubuntu-dep-apt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
compiler: [ {CC: /usr/bin/gcc-9, CXX: /usr/bin/g++-9}, {CC: /usr/bin/gcc-10, CXX: /usr/bin/g++-10}, {CC: /usr/bin/clang, CXX: /usr/bin/clang++} ]
standard: [ 98, 11, 14, 17 ]
standard: [ 11, 14, 17 ]

steps:
# https://github.com/marketplace/actions/cancel-workflow-action
Expand All @@ -36,7 +36,7 @@ jobs:
- name: Print compiler information
run: dpkg --list | grep compiler

- name: Install dependencies for ubuntu 18.04 and 20.04
- name: Install dependencies for ubuntu 20.04
if: matrix.os != 'ubuntu-22.04'
run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-22-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-dep-src.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Print OS information
run: lsb_release -a

- name: Install dependencies for ubuntu 18.04 and 20.04
- name: Install dependencies for ubuntu 20.04
if: matrix.os != 'ubuntu-22.04'
run: |
sudo apt-get update && sudo apt-get install -y libdc1394-22-dev
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-ustk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Print compiler information
run: dpkg --list | grep compiler

- name: Install dependencies for ubuntu 18.04 and 20.04
- name: Install dependencies for ubuntu 20.04
if: matrix.os != 'ubuntu-22.04'
run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-22-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev

Expand Down
43 changes: 6 additions & 37 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -551,8 +551,8 @@ VP_OPTION(USE_SOXT SOXT "" "Include Coin/SoXt support" "" OF
set(THREADS_PREFER_PTHREAD_FLAG ON)
VP_OPTION(USE_THREADS Threads "" "Include std::thread support" "" ON IF NOT (WIN32 OR MINGW))

# We need threads with c++11
if((VISP_CXX_STANDARD GREATER VISP_CXX_STANDARD_98) AND NOT USE_THREADS)
# We need threads. To be changed to make threads optional
if(NOT USE_THREADS)
if(Threads_FOUND)
message(WARNING "We need std::thread. We turn USE_THREADS=ON.")
unset(USE_THREADS)
Expand Down Expand Up @@ -589,38 +589,7 @@ VP_OPTION(USE_NLOHMANN_JSON nlohmann_json QUIET "Include nlohmann json support"
# ----------------------------------------------------------------------------
# Handle cxx standard depending on specific 3rd parties. Should be before module parsing and VISP3rdParty.cmake include
# ----------------------------------------------------------------------------
# if c++ standard is not at leat c++11, force 3rd parties that require at least c++11 to OFF
if(VISP_CXX_STANDARD LESS VISP_CXX_STANDARD_11)
if(USE_REALSENSE)
message(WARNING "librealsense 3rd party was detected and needs at least c++11 standard compiler flag while you have set c++${USE_CXX_STANDARD}. Thus we disable librealsense usage turning USE_REALSENSE=OFF.")
unset(USE_REALSENSE)
set(USE_REALSENSE OFF CACHE BOOL "Include RealSense SDK support" FORCE)
endif()
if(USE_REALSENSE2)
message(WARNING "librealsense2 3rd party was detected and needs at least c++11 standard compiler flag while you have set c++${USE_CXX_STANDARD}. Thus we disable librealsense2 usage turning USE_REALSENSE2=OFF.")
unset(USE_REALSENSE2)
set(USE_REALSENSE2 OFF CACHE BOOL "Include RealSense2 SDK support" FORCE)
endif()
if(USE_FRANKA)
message(WARNING "libfranka 3rd party was detected and needs at least c++11 standard compiler flag while you have set c++${USE_CXX_STANDARD}. Thus we disable libfranka usage turning USE_FRANKA=OFF.")
unset(USE_FRANKA)
set(USE_FRANKA OFF CACHE BOOL "Include libfranka SDK support for Franka Emika robots" FORCE)
endif()
if(USE_UR_RTDE)
message(WARNING "ur_rtde 3rd party was detected and needs at least c++11 standard compiler flag while you have set c++${USE_CXX_STANDARD}. Thus we disable ur_rtde usage turning USE_UR_RTDE=OFF.")
unset(USE_UR_RTDE)
set(USE_UR_RTDE OFF CACHE BOOL "Include ur_rtde SDK support for Universal Robots robots" FORCE)
endif()
if((OpenCV_VERSION VERSION_GREATER 4.0.0) OR (OpenCV_VERSION VERSION_EQUAL 4.0.0))
# if c++ standard is not at least 11: disable opencv 4.x usage
message(WARNING "OpenCV ${OpenCV_VERSION} 3rd party was detected and needs c++11 or higher compiler flag while you have set c++${USE_CXX_STANDARD}. Thus we disable OpenCV usage turning USE_OPENCV=OFF")
unset(USE_OPENCV)
set(USE_OPENCV OFF CACHE BOOL "Include OpenCV support" FORCE)
endif()
# Downgrade to cxx98 to completely disable cxx11
unset(CMAKE_CXX_STANDARD)
endif()

# if c++ standard is not at leat c++17, force 3rd parties that require at least c++17 to OFF
if(VISP_CXX_STANDARD LESS VISP_CXX_STANDARD_17)
if(USE_MAVSDK)
message(WARNING "mavsdk 3rd party was detected and needs at least c++17 standard compiler flag while you have set c++${USE_CXX_STANDARD}. Thus we disable MAVSDK usage turning USE_MAVSDK=OFF.")
Expand Down Expand Up @@ -665,9 +634,9 @@ VP_OPTION(WITH_APRILTAG_BIG_FAMILY "" "" "Build AprilTag big family (41h12,
VP_OPTION(WITH_ATIDAQ "" "" "Build atidaq-c as built-in library" "" ON IF USE_COMEDI AND NOT WINRT)
VP_OPTION(WITH_CLIPPER "" "" "Build clipper as built-in library" "" ON IF USE_OPENCV)
VP_OPTION(WITH_LAPACK "" "" "Build lapack as built-in library" "" ON IF NOT USE_LAPACK)
VP_OPTION(WITH_QBDEVICE "" "" "Build qbdevice-api as built-in library" "" ON IF (VISP_CXX_STANDARD GREATER VISP_CXX_STANDARD_98) AND (NOT WINRT) AND (NOT IOS))
VP_OPTION(WITH_TAKKTILE2 "" "" "Build Right Hand takktile2 driver as built-in library" "" ON IF (VISP_CXX_STANDARD GREATER VISP_CXX_STANDARD_98) AND (NOT WIN32) AND (NOT WINRT) AND (NOT IOS) AND (NOT ANDROID))
VP_OPTION(WITH_CATCH2 "" "" "Use catch2" "" ON IF (VISP_CXX_STANDARD GREATER VISP_CXX_STANDARD_98))
VP_OPTION(WITH_QBDEVICE "" "" "Build qbdevice-api as built-in library" "" ON IF (NOT WINRT) AND (NOT IOS))
VP_OPTION(WITH_TAKKTILE2 "" "" "Build Right Hand takktile2 driver as built-in library" "" ON IF (NOT WIN32) AND (NOT WINRT) AND (NOT IOS) AND (NOT ANDROID))
VP_OPTION(WITH_CATCH2 "" "" "Use catch2 for testing" "" ON)

# ----------------------------------------------------------------------------
# Check for specific functions. Should be after cxx standard detection in VISPDetectCXXStandard.cmake and potential modification depending on pcl, realsense2, libfranka
Expand Down
2 changes: 2 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ ViSP 3.x.x (Version in development)
.
- Deprecated removed
. vpPlanarObjectDetector, vpFernClassifier classes are removed
. End of supporting c++98 standard. As a consequence, ViSP is no more compatible with Ubuntu 12.04
- New features and improvements
. Introduce applications in apps folder, a collection of useful tools that
have a dependency to the install target
. Bump minimal c++ standard to c++11
- Applications
. Migrate eye-to-hand tutorials in apps
- Tutorials
Expand Down
5 changes: 1 addition & 4 deletions apps/calibration/visp-acquire-franka-calib-data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include <visp3/robot/vpRobotFranka.h>
#include <visp3/sensor/vpRealSense2.h>

#if defined(VISP_HAVE_REALSENSE2) && (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) && \
#if defined(VISP_HAVE_REALSENSE2) && \
(defined(VISP_HAVE_X11) || defined(VISP_HAVE_GDI)) && defined(VISP_HAVE_FRANKA) && \
defined(VISP_HAVE_MODULE_GUI) && defined(VISP_HAVE_MODULE_ROBOT) && defined(VISP_HAVE_MODULE_SENSOR) // optional

Expand Down Expand Up @@ -169,9 +169,6 @@ int main()
#if !defined(VISP_HAVE_REALSENSE2)
std::cout << "Install librealsense-2.x." << std::endl;
#endif
#if !(VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
std::cout << "Build ViSP with c++11 or higher compiler flag (cmake -DUSE_CXX_STANDARD=11)." << std::endl;
#endif
#if !defined(VISP_HAVE_FRANKA)
std::cout << "Install libfranka." << std::endl;
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include <visp3/robot/vpRobotUniversalRobots.h>
#include <visp3/sensor/vpRealSense2.h>

#if defined(VISP_HAVE_REALSENSE2) && (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) && \
#if defined(VISP_HAVE_REALSENSE2) && \
(defined(VISP_HAVE_X11) || defined(VISP_HAVE_GDI)) && defined(VISP_HAVE_UR_RTDE) && \
defined(VISP_HAVE_MODULE_GUI) && defined(VISP_HAVE_MODULE_ROBOT) && defined(VISP_HAVE_MODULE_SENSOR) // optional

Expand Down Expand Up @@ -171,9 +171,6 @@ int main()
#if !defined(VISP_HAVE_REALSENSE2)
std::cout << "Install librealsense-2.x." << std::endl;
#endif
#if !(VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
std::cout << "Build ViSP with c++11 or higher compiler flag (cmake -DUSE_CXX_STANDARD=11)." << std::endl;
#endif
#if !defined(VISP_HAVE_UR_RTDE)
std::cout << "ViSP is not build with libur_rtde 3rd party used to control a robot from Universal Robots..."
<< std::endl;
Expand Down
6 changes: 2 additions & 4 deletions apps/calibration/visp-compute-hand-eye-calibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,9 @@ int main(int argc, const char *argv[])
// save eMc
std::string name_we = vpIoTools::createFilePath(vpIoTools::getParent(opt_eMc_file), vpIoTools::getNameWE(opt_eMc_file)) + ".txt";
std::cout << std::endl << "Save transformation matrix eMc as an homogeneous matrix in: " << name_we << std::endl;
#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)

std::ofstream file_eMc(name_we);
#else
std::ofstream file_eMc(name_we.c_str());
#endif

eMc.save(file_eMc);

vpPoseVector pose_vec(eMc);
Expand Down
36 changes: 10 additions & 26 deletions cmake/VISPDetectCXXStandard.cmake
Original file line number Diff line number Diff line change
@@ -1,38 +1,30 @@
set(VISP_CXX_STANDARD_98 199711L)
set(VISP_CXX_STANDARD_98 199711L) # Keep for compat with previous releases
set(VISP_CXX_STANDARD_11 201103L)
set(VISP_CXX_STANDARD_14 201402L)
set(VISP_CXX_STANDARD_17 201703L)

if(DEFINED USE_CXX_STANDARD)

if(USE_CXX_STANDARD STREQUAL "98")
set(CMAKE_CXX_STANDARD 98)
set(VISP_CXX_STANDARD ${VISP_CXX_STANDARD_98})
elseif(USE_CXX_STANDARD STREQUAL "11")
set(CMAKE_CXX_STANDARD 11)
set(VISP_CXX_STANDARD ${VISP_CXX_STANDARD_11})
if(USE_CXX_STANDARD STREQUAL "11")
set(CMAKE_CXX_STANDARD 11)
set(VISP_CXX_STANDARD ${VISP_CXX_STANDARD_11})
elseif(USE_CXX_STANDARD STREQUAL "14")
set(CMAKE_CXX_STANDARD 14)
set(VISP_CXX_STANDARD ${VISP_CXX_STANDARD_14})
set(CMAKE_CXX_STANDARD 14)
set(VISP_CXX_STANDARD ${VISP_CXX_STANDARD_14})
elseif(USE_CXX_STANDARD STREQUAL "17")
set(CMAKE_CXX_STANDARD 17)
set(VISP_CXX_STANDARD ${VISP_CXX_STANDARD_17})
set(CMAKE_CXX_STANDARD 17)
set(VISP_CXX_STANDARD ${VISP_CXX_STANDARD_17})
endif()

set(CMAKE_CXX_EXTENSIONS OFF) # use -std=c++11 instead of -std=gnu++11

else()

set(AVAILABLE_CXX_STANDARD TRUE)
set(VISP_CXX_STANDARD ${VISP_CXX_STANDARD_98})
set(VISP_CXX_STANDARD ${VISP_CXX_STANDARD_11})

set(CMAKE_CXX_STANDARD_REQUIRED FALSE)

if(CMAKE_CXX98_COMPILE_FEATURES)
set(CXX98_STANDARD_FOUND ON CACHE STRING "cxx98 standard")
mark_as_advanced(CXX98_STANDARD_FOUND)
endif()

if(CMAKE_CXX11_COMPILE_FEATURES)
# cxx11 implementation maybe incomplete especially with g++ 4.6.x.
# That's why we check more in depth for cxx_override that is not available with g++ 4.6.3
Expand Down Expand Up @@ -60,8 +52,6 @@ else()
set(USE_CXX_STANDARD "14" CACHE STRING "Selected cxx standard")
elseif(CXX11_STANDARD_FOUND)
set(USE_CXX_STANDARD "11" CACHE STRING "Selected cxx standard")
elseif(CXX98_STANDARD_FOUND)
set(USE_CXX_STANDARD "98" CACHE STRING "Selected cxx standard")
else()
set(AVAILABLE_CXX_STANDARD FALSE)
endif()
Expand All @@ -72,9 +62,6 @@ else()
endif()

if(AVAILABLE_CXX_STANDARD)
if(CXX98_STANDARD_FOUND)
set_property(CACHE USE_CXX_STANDARD APPEND_STRING PROPERTY STRINGS "98")
endif()
if(CXX11_STANDARD_FOUND)
set_property(CACHE USE_CXX_STANDARD APPEND_STRING PROPERTY STRINGS ";11")
endif()
Expand All @@ -85,10 +72,7 @@ else()
set_property(CACHE USE_CXX_STANDARD APPEND_STRING PROPERTY STRINGS ";17")
endif()

if(USE_CXX_STANDARD STREQUAL "98")
set(CMAKE_CXX_STANDARD 98)
set(VISP_CXX_STANDARD ${VISP_CXX_STANDARD_98})
elseif(USE_CXX_STANDARD STREQUAL "11")
if(USE_CXX_STANDARD STREQUAL "11")
set(CMAKE_CXX_STANDARD 11)
set(VISP_CXX_STANDARD ${VISP_CXX_STANDARD_11})
elseif(USE_CXX_STANDARD STREQUAL "14")
Expand Down
3 changes: 0 additions & 3 deletions cmake/templates/VISPConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,6 @@ set(VISP_HAVE_CMU1394 "@VISP_HAVE_CMU1394@")
set(VISP_HAVE_COIN3D "@VISP_HAVE_COIN3D@")
set(VISP_HAVE_COIN3D_AND_GUI "@VISP_HAVE_COIN3D_AND_GUI@")
set(VISP_HAVE_COMEDI "@VISP_HAVE_COMEDI@")
set(VISP_HAVE_CPP11_COMPATIBILITY "@VISP_HAVE_CXX11@") # to keep compat with previous releases
set(VISP_HAVE_CXX11 "@VISP_HAVE_CXX11@")
set(VISP_CXX_STANDARD_98 "@VISP_CXX_STANDARD_98@")
set(VISP_CXX_STANDARD_11 "@VISP_CXX_STANDARD_11@")
set(VISP_CXX_STANDARD_14 "@VISP_CXX_STANDARD_14@")
set(VISP_CXX_STANDARD_17 "@VISP_CXX_STANDARD_17@")
Expand Down
8 changes: 1 addition & 7 deletions cmake/templates/vpConfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -485,19 +485,13 @@
#cmakedefine VISP_HAVE_NLOHMANN_JSON

// Define c++ standard values also available in __cplusplus when gcc is used
#define VISP_CXX_STANDARD_98 ${VISP_CXX_STANDARD_98}
#define VISP_CXX_STANDARD_98 ${VISP_CXX_STANDARD_98} # Keep for compat with previous releases
#define VISP_CXX_STANDARD_11 ${VISP_CXX_STANDARD_11}
#define VISP_CXX_STANDARD_14 ${VISP_CXX_STANDARD_14}
#define VISP_CXX_STANDARD_17 ${VISP_CXX_STANDARD_17}

#define VISP_CXX_STANDARD ${VISP_CXX_STANDARD}

// Defined to keep compat with previous releases when c++ 11 available
#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
# define VISP_HAVE_CXX11
# define VISP_HAVE_CPP11_COMPATIBILITY
#endif

// Defined if isnan macro is available
#cmakedefine VISP_HAVE_FUNC_ISNAN

Expand Down
3 changes: 0 additions & 3 deletions doc/config-doxygen.in
Original file line number Diff line number Diff line change
Expand Up @@ -2153,9 +2153,6 @@ PREDEFINED = @DOXYGEN_SHOULD_SKIP_THIS@ \
VISP_HAVE_COIN3D \
VISP_HAVE_COIN3D_AND_GUI \
VISP_HAVE_COMEDI \
VISP_HAVE_CPP11_COMPATIBILITY \
VISP_HAVE_CXX11 \
VISP_CXX_STANDARD_98=@VISP_CXX_STANDARD_98@ \
VISP_CXX_STANDARD_11=@VISP_CXX_STANDARD_11@ \
VISP_CXX_STANDARD_14=@VISP_CXX_STANDARD_14@ \
VISP_CXX_STANDARD_17=@VISP_CXX_STANDARD_17@ \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Otherwise, the configuration must be made in the code.

\snippet tutorial-detection-object-mbt-deprecated.cpp Keypoint code config

We then detect keypoints in the reference image with the object we want to learn :
We then detect keypoints in the reference image with the object we want to learn :

\snippet tutorial-detection-object-mbt-deprecated.cpp Keypoints reference detection

Expand Down Expand Up @@ -173,7 +173,7 @@ And finally, we build the reference keypoints and we set the flag append to true

\subsection dep_detection_object_display_multiple_images How to display the matching when the learning is done on multiple images

In this section we will explain how to display the matching between keypoints detected in the current image and their correspondances in the reference images that are used during the learning stage, as given in the next video:
In this section we will explain how to display the matching between keypoints detected in the current image and their correspondences in the reference images that are used during the learning stage, as given in the next video:

\htmlonly
<iframe width="420" height="315" src="https://www.youtube.com/embed/q16lXMIVDbM" frameborder="0" allowfullscreen></iframe>
Expand Down
4 changes: 2 additions & 2 deletions doc/tutorial/detection/tutorial-detection-object.dox
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Otherwise, the configuration must be made in the code.

\snippet tutorial-detection-object-mbt.cpp Keypoint code config

We then detect keypoints in the reference image with the object we want to learn :
We then detect keypoints in the reference image with the object we want to learn :

\snippet tutorial-detection-object-mbt.cpp Keypoints reference detection

Expand Down Expand Up @@ -171,7 +171,7 @@ And finally, we build the reference keypoints and we set the flag append to true

\subsection detection_object_display_multiple_images How to display the matching when the learning is done on multiple images

In this section we will explain how to display the matching between keypoints detected in the current image and their correspondances in the reference images that are used during the learning stage, as given in the next video:
In this section we will explain how to display the matching between keypoints detected in the current image and their correspondences in the reference images that are used during the learning stage, as given in the next video:

\htmlonly
<iframe width="420" height="315" src="https://www.youtube.com/embed/q16lXMIVDbM" frameborder="0" allowfullscreen></iframe>
Expand Down
15 changes: 6 additions & 9 deletions example/device/framegrabber/getRealSense2Info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include <iostream>
#include <visp3/sensor/vpRealSense2.h>

#if defined(VISP_HAVE_REALSENSE2) && (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
#if defined(VISP_HAVE_REALSENSE2)

int main()
{
Expand All @@ -57,11 +57,13 @@ int main()

if (rs.getDepthScale() != 0) // If it has depth sensor
std::cout << "Depth scale: " << std::setprecision(std::numeric_limits<float>::max_digits10) << rs.getDepthScale()
<< std::endl;
<< std::endl;

} catch (const vpException &e) {
}
catch (const vpException &e) {
std::cerr << "RealSense error " << e.what() << std::endl;
} catch (const std::exception &e) {
}
catch (const std::exception &e) {
std::cerr << e.what() << std::endl;
}

Expand All @@ -75,11 +77,6 @@ int main()
std::cout << "Tip:" << std::endl;
std::cout << "- Install librealsense2, configure again ViSP using cmake and build again this example" << std::endl;
return EXIT_SUCCESS;
#endif
#if (VISP_CXX_STANDARD < VISP_CXX_STANDARD_11)
std::cout << "You do not build ViSP with c++11 or higher compiler flag" << std::endl;
std::cout << "Tip:" << std::endl;
std::cout << "- Configure ViSP again using cmake -DUSE_CXX_STANDARD=11, and build again this example" << std::endl;
#endif
return EXIT_SUCCESS;
}
Expand Down
9 changes: 2 additions & 7 deletions example/device/framegrabber/grabRealSense.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#include <visp3/gui/vpDisplayX.h>
#include <visp3/sensor/vpRealSense.h>

#if defined(VISP_HAVE_REALSENSE) && (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
#if defined(VISP_HAVE_REALSENSE)

// Using a thread to display the pointcloud with PCL produces a segfault on
// OSX
Expand Down Expand Up @@ -113,7 +113,7 @@ vpThread::Return displayPointcloudFunction(vpThread::Args args)

int main()
{
#if defined(VISP_HAVE_REALSENSE) && (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
#if defined(VISP_HAVE_REALSENSE)
try {
vpRealSense rs;
rs.setStreamSettings(rs::stream::color, vpRealSense::vpRsStreamParams(640, 480, rs::format::rgba8, 30));
Expand Down Expand Up @@ -254,11 +254,6 @@ int main()

#elif !defined(VISP_HAVE_REALSENSE)
std::cout << "This deprecated example is only working with librealsense 1.x" << std::endl;
#elif (VISP_CXX_STANDARD < VISP_CXX_STANDARD_11)
std::cout << "You do not build ViSP with c++11 or higher compiler flag" << std::endl;
std::cout << "Tip:" << std::endl;
std::cout << "- Configure ViSP again using cmake -DUSE_CXX_STANDARD=11, and build again this example" << std::endl;
<< std::endl;
#endif
return EXIT_SUCCESS;
}
Loading

0 comments on commit 66fab3a

Please sign in to comment.