Open nholthaus opened 3 years ago
like weight/volume 'ounces'
Is this a cross-system clash? mp-units has namespaces for each systems, which tells me that the current design of this library, which has namespaces per dimension, like units::length
, would still have clashes for cross-system units with units of the same name and the same dimension. I vaguely remember there being one such case for the length dimension.
It seems to me v2.3, as a whole, over-uses namespaces (e.g.
units::math
), with the effect of breaking ADL or having it behave counter-intuitively.It's obvious that math and non-member functions should be moved out of domain namespaces, but I think it begs the question of whether or not all definitions should be moved into the unit namespace.
The original intent was to avoid name clashes like weight/volume 'ounces', but there are relatively few, and they generally have canonical de-conflicted names.
Should we remove all domain-specific namespaces for the next release?