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
For types that are math-like, I am in the habit of putting operators like abs in the same namespace so they are found by ADL if I do the std::swap two-step as in
template <typename T>
[[nodiscard]] automyGenericFunction(T x) {
using std::abs;
x = abs(x); // Finds std::abs for T == double, but finds abs by ADL otherwise.
...
Having them in ::units::math breaks that, and there's not really a solution in generic code.
The text was updated successfully, but these errors were encountered:
For types that are math-like, I am in the habit of putting operators like
abs
in the same namespace so they are found by ADL if I do thestd::swap
two-step as inHaving them in
::units::math
breaks that, and there's not really a solution in generic code.The text was updated successfully, but these errors were encountered: