Open FreeCAD-Bug-Importer opened 2 years ago
CC @chennes @donovaly what the status of this ticket?
I think only @wwmayer has the overview here. However, not pressing thus postponing.
I've just compiled FreeCAD using gcc 12.3 with C++20 option on Ubuntu 22.04. If I set CMAKE_CXX_STANDARD
to 20, it does not affect BUILD_ENABLE_CXX_STD
. I don't know what the latter option is for.
Perhaps, MSVC can compile FreeCAD with /std:c++latest
as well.
I'm actively working on this one because Qt6 requires /permissive-
with MSVC. I've got it working, actually, I was just polishing some other things before submitting the PR. This should be fixed within the week.
@chennes does this ticket get fixed by #11014 ?
At least the /permissive- part: I'm not testing with c++latest yet.
is this still relevant? @chennes you are assigned and it has the 1.0 milestone, but it already had the 0.21 tag :)
The first half is done, we compile just fine with /permissive-
now, but I have not had chance to poke at /std:c++latest
. It can be post-1.0.
To get /std:c++latest
working the following need to be addressed:
::set_unexpected
(from pre-c++17) but assumes that if _MSC_VER is defined then it can. With the /std:c++latest flag, it is wrong. Utils_ExceptHandlers.hxx line 41 must be updated.::set_terminate
, on line 51.::set_unexpected
if _MSC_VER is detected, which is not a good enough detection now.import
is now a reserved word, and cannot be used as a variable name on line 83.All told this should be pretty straightforward.
Issue imported from https://tracker.freecad.org/view.php?id=4765
Original report text
Hi All,
The MSVC team recently added FreeCAD as part of RWC testing to detect compiler regressions. And we found some errors when building FreeCAD with '/permissive-' and '/std:c++latest' option. Can you help to fix these issues? Thanks.
I noticed that some of these errors are come from Boost library, and these issue have been fixed on Boost latest version. After I fixed Boost errors, more errors were exposed by the project itself.
Steps to reproduce
Other bug information
Discussion from Mantis ticket
Comment by chennes 2021-11-01 16:50
Thank you for the report -- we'll look into these issues.
Comment by chennes 2021-11-04 02:42
https://github.com/FreeCAD/FreeCAD/commit/833868bd1394862f6fab079fa74685f09675129a fixes one of the issues.
Comment by chennes 2021-11-06 15:57
https://github.com/FreeCAD/FreeCAD/commit/6d2aa6acc9f58d8f8cf0d4744d9a0ed86ac18ed5 fixes another.
Comment by uwestoehr 2021-12-20 10:02
https://github.com/FreeCAD/FreeCAD/commit/6ad156b6b77 fixes another one
Comment by uwestoehr 2021-12-22 00:40
and another one: https://github.com/FreeCAD/FreeCAD/commit/5fba9cec