public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* g++: change in behaviour since gcc-2.95.2
@ 1999-12-21  2:25 Martin Reinecke
  1999-12-21  4:54 ` Martin v. Loewis
  1999-12-31 23:54 ` Martin Reinecke
  0 siblings, 2 replies; 4+ messages in thread
From: Martin Reinecke @ 1999-12-21  2:25 UTC (permalink / raw)
  To: gcc

Consider the following code snippet:

class MSG_STREAM
  {
  public:
    template<typename T> MSG_STREAM &operator<< (const T &data) {}
  };

MSG_STREAM *simple_manip (MSG_STREAM &blah) {}

int main()
  {
  MSG_STREAM foo;
  foo << 5 << simple_manip;
  }

gcc 2.95.2 compiles this without complaints, while the current CVS version says

test.cc: In function `int main ()':
test.cc:12: no match for `MSG_STREAM & << MSG_STREAM *(&) (MSG_STREAM &)'

Is this new behaviour according to the standard? If so, could you please point
me to some information why pointers to functions cannot be used as template
parameter types?

Thanks in advance,
  Martin

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

end of thread, other threads:[~1999-12-31 23:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-21  2:25 g++: change in behaviour since gcc-2.95.2 Martin Reinecke
1999-12-21  4:54 ` Martin v. Loewis
1999-12-31 23:54   ` Martin v. Loewis
1999-12-31 23:54 ` Martin Reinecke

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).