Closed le-migou closed 6 years ago
100% right. This has already been corrected in the v3.x development. No plans to change namespacing in the 2.x line.
You may want to try out v3 alpha 2. It's more stable than the name implies and has a lot of improvements for generality and sfinae friendliness, although we still have a way to go.
Let's say I'm building the following generic library
. Using it with units won't work because the
sqrt
function is in the namespacemath
and ADL will not find it.. Putting all the math overloaded functions in the namespace of
unit_t
is the way to go in order for ADL to work. (See recommendations C.5 and C.168 of the Core Guidelines.) So I propose to remove the namespacemath
entirely.