Crash with 'cout << "";'

Benjamin Kosnik bkoz@cygnus.com
Tue Oct 19 09:27:00 GMT 1999


Seems to be fine with CVS sources. . .

-Benjamin

> #include <iostream>
> 
> struct Out { } out;
> 
> ostream& operator<<(ostream& s, const Out) {
>   return s; // executes OK
> }
> 
> int main() {
>   cout << out << endl;
>   cout << ""; // segfault here if string empty
>   return 0;
> }


More information about the Libstdc++ mailing list