mcptam icon indicating copy to clipboard operation
mcptam copied to clipboard

Switch to C++11 or C++14 compile flag?

Open stevenwaslander opened this issue 9 years ago • 3 comments

Only issue is to 3DMG-imu driver, which needed three constants changed to constexpr (as they are floats and doubles).

stevenwaslander avatar Dec 23 '15 18:12 stevenwaslander

Note, I can't seem to compile with C++0x anymore, had to switch my local version to C++11 with the changes to the imu driver.

stevenwaslander avatar Dec 24 '15 04:12 stevenwaslander

What file is causing this? I have not been getting an error on my end.

On Wed, Dec 23, 2015 at 11:24 PM, Steven Waslander <[email protected]

wrote:

Assigned #30 https://github.com/wavelab/mcptam/issues/30 to @StanJBrown https://github.com/StanJBrown.

— Reply to this email directly or view it on GitHub https://github.com/wavelab/mcptam/issues/30#event-499941328.

StanJBrown avatar Dec 24 '15 04:12 StanJBrown

I'm assuming something upgraded in terms of my compiler, as the imu package was throwing errors to do with const vs constexpr of constant doubles (which are not of type "integral"). I fixed this by changing const to constexpr in three places in the 3dmgx2.h and 3dmgx2.cc (for the const doubles G, KF_K_1, KF_K_2). This is only possible with a change to the CXX_FLAGS to C++11 from C++0x in CMakeLists.txt for both IMU and MCPTAM packages.

stevenwaslander avatar Dec 24 '15 14:12 stevenwaslander