This is a stripped down version of what happens through 4 layers of indirection. The overlaod resolution breaks down in the vicinity of a local lambda with the same name. Which is some kind of mainetenance issue, especially if the code still builds (here it doesn't) and the error is only caught in tests.
Is there an elegant way to circumvent this? See the Godbolt Playgound for this issue.
#include "catch.hpp"
#include <iostream>
#include <map>
#include <string>
namespace {
struct Something {};
template <typename T>
void process(const T& x, Something const& s){}
struct A {
};
void process(A const& p, Something const& s){}
struct B {
};
void process(B const& p, Something const& s){}
} // namespace
int main {
struct C {};
// THIS lanbda shadows the visibility of formerly defined
// functions with same name. This is a maintainability issue
auto process = [](C const& p, Something const& s) {};
Something s{};
A a{};
B b{};
C c{};
process(a, s);
process(b, s);
}