You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, if I understand correctly, you already use fundamental unsafe types in your interfaces. If so, you can easily conditionally add additional type-safe overloads to them.
In case you already have some Simple strong-type wrappers for units, mp-units provides powerful conversation traits that give us full control of how we can interact with such interfaces.
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 #8262 (comment)
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.The text was updated successfully, but these errors were encountered: