public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: m.doppler@icoserve.com To: gcc-gnats@gcc.gnu.org Cc: p.klotz@icoserve.com Subject: c++/8158: Compiler rejects legal default parameter Date: Mon, 07 Oct 2002 05:56:00 -0000 [thread overview] Message-ID: <20021007124715.29573.qmail@sources.redhat.com> (raw) >Number: 8158 >Category: c++ >Synopsis: Compiler rejects legal default parameter >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Mon Oct 07 05:56:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Michael Doppler, Peter Klotz >Release: gcc 3.2, gcc 3.1 >Organization: >Environment: Redhat 8.0, gcc 3.2, glibc 2.2.93 Redhat 7.2, gcc 3.1, glibc 2.2.4 >Description: The following code doesn't compile although it should. #include <map> class A { public: typedef std::map<unsigned char,int> TType; //A(const TType& x=TType()) // this works A( const std::map<unsigned char, int> & p_map = std::map<unsigned char, int>() ) // this doesn't { } }; int main(void ) { A a; return 0; } >How-To-Repeat: Compile program from description. >Fix: Workaround: use typedef provided in code snippet. >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2002-10-07 12:56 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-10-07 5:56 m.doppler [this message] 2002-10-07 9:42 nathan
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=20021007124715.29573.qmail@sources.redhat.com \ --to=m.doppler@icoserve.com \ --cc=gcc-gnats@gcc.gnu.org \ --cc=p.klotz@icoserve.com \ /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: linkBe 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).