public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Christoph Ludwig <cludwig@cdc.informatik.tu-darmstadt.de> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: c++/7522: access by friend function's default argument Date: Fri, 17 Jan 2003 08:46:00 -0000 [thread overview] Message-ID: <20030117084605.14628.qmail@sources.redhat.com> (raw) The following reply was made to PR c++/7522; it has been noted by GNATS. From: Christoph Ludwig <cludwig@cdc.informatik.tu-darmstadt.de> To: bangerth@dealii.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Cc: Subject: Re: c++/7522: access by friend function's default argument Date: Fri, 17 Jan 2003 09:37:57 +0100 Hi, On Thu, Oct 31, 2002 at 05:24:55PM -0000, bangerth@dealii.org wrote: > Synopsis: access by friend function's default argument > > State-Changed-From-To: feedback->analyzed > State-Changed-By: bangerth > State-Changed-When: Thu Oct 31 09:24:55 2002 > State-Changed-Why: > One way or other, the example Christoph gave shows a bug, > since treatment is not consistent. So I reset the state > to "analyzed". > > And no, I don't know what is right and wrong here, sorry. A post by John Spicer to comp.std.c++ (Thread: "Req Clarification: private type used in parameter list of friend function") pointed me to 11.0.5 in the standard. There is an example that settles the question, I think: class A { typedef int I; // private member I f(); friend I g(I); static I x; }; A::I A::f() { return 0; } A::I g(A::I p = A::x); gcc 3.2.1 rejects the default argument in the last line, but according to the standard the example is well formed. Regards Christoph > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7522
next reply other threads:[~2003-01-17 8:46 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-01-17 8:46 Christoph Ludwig [this message] -- strict thread matches above, loose matches on Subject: below -- 2003-01-28 16:58 bangerth 2002-10-31 9:24 bangerth 2002-10-31 8:46 Christoph Ludwig 2002-10-30 15:32 bangerth 2002-08-07 8:46 Christoph Ludwig
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=20030117084605.14628.qmail@sources.redhat.com \ --to=cludwig@cdc.informatik.tu-darmstadt.de \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@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: 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).