* Can't return stream
@ 2000-05-12 2:34 Ivan Martinez
2000-05-12 2:44 ` Alexandre Oliva
0 siblings, 1 reply; 2+ messages in thread
From: Ivan Martinez @ 2000-05-12 2:34 UTC (permalink / raw)
To: GCC mailing list
Hello all,
I have a function where I want to return an stream:
iostream Class::ErrorsReport() const
{
iostream ErrorsReport;
...
return ErrorsReport;
}
I tried with iostream, stream, strstream, ostrstream..., declaring the
function const and non const, and I always get:
.../g++-3/streambuf.h:128:'ios::ios(const ios&)' is private
...: within this context
(Last one refers to return keyword line)
Isn't it possible to return a copy of a stream?.
--
Ivan Martinez (Rodriguez)
BEng in Software Engineering - MEng student
http://www.student.dtu.dk/~u990873
"Got fabes?"
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Can't return stream
2000-05-12 2:34 Can't return stream Ivan Martinez
@ 2000-05-12 2:44 ` Alexandre Oliva
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Oliva @ 2000-05-12 2:44 UTC (permalink / raw)
To: ivan_m_r; +Cc: GCC mailing list
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 466 bytes --]
On May 12, 2000, Ivan Martinez <ex08@kalman.iau.dtu.dk> wrote:
> Isn't it possible to return a copy of a stream?.
Nope. Streams aren't required to be copy-constructible.
--
Alexandre Oliva Enjoy Guaraná, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-05-12 2:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-12 2:34 Can't return stream Ivan Martinez
2000-05-12 2:44 ` Alexandre Oliva
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).