https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98231
Bug ID: 98231 Summary: [11 Regression] bogus error: no match for ‘operator<<’ Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org Target Milestone: --- template <typename, typename = int> struct basic_ostream {}; namespace N { template <typename Char, typename CharTraits, typename T> void operator<<(basic_ostream<Char, CharTraits>, T); } basic_ostream<char> os; template<typename T> void foo (T value) { using N::operator<<; os << value; } void bar() { foo (1); } gives $ ./cc1plus -quiet ceph.C ceph.C: In instantiation of ‘void foo(T) [with T = int]’: ceph.C:14:20: required from here ceph.C:12:6: error: no match for ‘operator<<’ (operand types are ‘basic_ostream<char>’ and ‘int’) 12 | os << value; | ~~~^~~~~~~~ Started with r11-4690.