My colleague defined a bunch of functions (which should be in my opinion free functions) inside a stateless class as static member functions.
Since this class is defined and uses types from a nested namespace, I'd like to use ADL to write less non-usefull code. But doesn't their choice just broke the purpose of ADL?
namespace nested_long_namespace_name
{
struct type {};
struct interface { static void f(type) {} };
}
int main()
{
nested_long_namespace_name::type value{};
f(value); // ERROR (ADL does not kick in)
interface::f(value); // ERROR (ADL does not kick in)
nested_long_namespace_name::interface::f(value); // OK
}
Now, my question is: is there a workaround other that defining f as a free function in the namespace nested_long_namespace_name?