[basic.lookup.argdep] (original) (raw)
:
Translation unit #1:
export module M; namespace R { export struct X {}; export void f(X); } namespace S { export void f(R::X, R::X); }
Translation unit #2:
export module N; import M; export R::X make(); namespace R { static int g(X); } export template<typename T, typename U> void apply(T t, U u) { f(t, u); g(t); }
Translation unit #3:
module Q;
import N;
namespace S {
struct Z { template operator T(); };
}
void test() {
auto x = make();
R::f(x);
f(x);
f(x, S::Z());
apply(x, S::Z());
}
— end example