public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Claudio Bley" <bley@cs.uni-magdeburg.de>
To: "Edwin Chan/Toronto/IBM" <edwinc@ca.ibm.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: How to construct an object derived from class ostream in g++ version 3
Date: Tue, 18 Jun 2002 15:35:00 -0000	[thread overview]
Message-ID: <15631.46519.595365.63984@wh2-19.st.uni-magdeburg.de> (raw)
In-Reply-To: <OFAA37BDAD.09C912DB-ON85256BDC.006AD13E@torolab.ibm.com>

>>>>> "Edwin" == Edwin Chan/Toronto/IBM <edwinc@ca.ibm.com> writes:

    Edwin>  Here's a test file to show what I really meant.  #include
    Edwin> <iostream.h> class PageStream: virtual public ios, public
    Edwin> ostream{ public: PageStream(); };
    Edwin> PageStream::PageStream(){} int main(){return 0;}

    Edwin> candidates are: std::basic_ostream<_CharT,
    Edwin> _Traits>::basic_ostream(const std::basic_ostream<_CharT,
    Edwin> _Traits>&) [with _CharT = char, _Traits =
    Edwin> std::char_traits<char>]
    Edwin> /.../torolab.ibm.com/fs/projects/vabld/run/gcc/3.0.3/include/g++-v3/bits/std_ostream.h:67:

    Edwin> std::basic_ostream<_CharT,
    Edwin> _Traits>::basic_ostream(std::basic_streambuf <_CharT,
    Edwin> _Traits>*) [with _CharT = char, _Traits =
    Edwin> std::char_traits<char>]

    Edwin> What is required to match the function call? Is there
    Edwin> something missing in the constructor?

GCC already told you which constructors are available.

You're trying to use the default constructor of class ostream which is
declared protected in its base class basic_ios<>.

You need to use one of the other constructors:

ostream(streambuf*) or ostream(const ostream&)


Claudio

      reply	other threads:[~2002-06-18 22:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-18 12:28 Edwin Chan/Toronto/IBM
2002-06-18 15:35 ` Claudio Bley [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15631.46519.595365.63984@wh2-19.st.uni-magdeburg.de \
    --to=bley@cs.uni-magdeburg.de \
    --cc=edwinc@ca.ibm.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).