Open lrineau opened 3 months ago
mp-units is an excellent library. However, I understand from that issue that in order to use it, you would need to add macros to disable that support for C++17 users, which seems undesirable.
There are other high-quality modern C++ units libraries that have a less stringent minimum version requirement. In particular, many are compatible with C++14, and more still with C++17. Here's a GitHub query giving a list of C++ units libraries.
I've done a detailed feature comparison of the top libraries by GitHub stars, plus Boost Units. (Full disclosure: I'm the author of one of these libraries, and the comparison is hosted on its documentation website.)
Before picking a library to use, it might be good to compare the feature diff between mp-units and the best C++17-compatible alternative. Then, decide whether those extra features for the C++20 users are worth completely excluding the C++17 users.
Previous discussion, in a PR
Originally posted by @mpusz in https://github.com/CGAL/cgal/issues/8262#issuecomment-2157785595
Proposal for enhancement
In
CGAL::Epick
, we could try to supportmp-units
's abstraction for the affine space (in our case that would be the 2D and 3D Euclidean spaces).That would be a way to verify if CGAL is correct about units.
If the CGAL kernel testsuite passes with a variant of
Epick
usingmp-units
, that would be a big achievement.