public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98231] New: [11 Regression] bogus error: no match for ‘operator<<’
@ 2020-12-11  2:30 mpolacek at gcc dot gnu.org
  2020-12-11  2:31 ` [Bug c++/98231] " mpolacek at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-12-11  2:30 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-01-13 22:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-11  2:30 [Bug c++/98231] New: [11 Regression] bogus error: no match for ‘operator<<’ mpolacek at gcc dot gnu.org
2020-12-11  2:31 ` [Bug c++/98231] " mpolacek at gcc dot gnu.org
2021-01-13 16:08 ` mpolacek at gcc dot gnu.org
2021-01-13 17:00 ` mpolacek at gcc dot gnu.org
2021-01-13 22:16 ` cvs-commit at gcc dot gnu.org
2021-01-13 22:17 ` mpolacek at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).