On Mon, 8 Jun 2020 at 23:11, John Spicer <[email protected]> wrote: > > I don’t recall if a feature test macro was discussed for this. > > At the time, I think I would have thought one was not needed, but that could > be wrong. > > There is a workaround of sorts. If you add any function template with the > same name and that will be found by normal lookup, then ADL will be done for > the function template call with the explicit argument list. > > namespace N { > struct A { }; > template <typename T> > T func(const A&) { return T(); } > } > template <class T, int x[-sizeof(T)]> void func(); // something uncallable > > void f() { > N::A a; > func<int>(a); > }
Impressive. :) > Which is not to say that we shouldn’t add a macro for this. Not indeed; I would hesitate to recommend such techniques, although for desperate users, maybe. -- SG10 mailing list [email protected] https://lists.isocpp.org/mailman/listinfo.cgi/sg10
