This is the mail archive of the
libstdc++@sources.redhat.com
mailing list for the libstdc++ project.
About endl...
- To: libstdc++ at sources dot redhat dot com
- Subject: About endl...
- From: Jean-Marc Valin <valj01 at gel dot usherb dot ca>
- Date: Sat, 25 Nov 2000 14:21:32 -0500
- Organization: Universite de Sherbrooke
Hi,
I would like to know whether this is a bug or a feature. I have found that the
following program that used to compile with gcc 2.95 doesn't compile anymore
with gcc 3 (libstdc++ 3).
#include <iostream>
using namespace std;
template <class T>
void output(T val) {
cout << val;
}
int main() {
output(endl);
}
The error message I get is:
output.cc: In function `int main()':
output.cc:11: no matching function for call to `output (<unknown type>)'
The same way, "typeid(endl)" doesn't compile either. This behaviour is very
annoying because it breaks some template functions. Is there anything that can
be done about that?
Jean-Marc
--
Jean-Marc Valin
Universite de Sherbrooke - Genie Electrique
valj01@gel.usherb.ca