https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109232
--- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> --- Here's another perhaps simpler version that explicitly gives begin<R> internal linkage, which also fails to link: namespace { template<class T> auto begin(T&& r) { return r.begin(); } } struct R { int* begin(); }; static_assert(__is_same(decltype(begin(R())), int*)); int main() { }