public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Martin Sebor <sebor@roguewave.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org Subject: Re: c++/70 Date: Tue, 29 May 2001 11:16:00 -0000 [thread overview] Message-ID: <20010529181603.12340.qmail@sourceware.cygnus.com> (raw) The following reply was made to PR c++/70; it has been noted by GNATS. From: Martin Sebor <sebor@roguewave.com> To: rodrigc@gcc.gnu.org Cc: gcc-gnats@gcc.gnu.org Subject: Re: c++/70 Date: Tue, 29 May 2001 12:10:00 -0600 rodrigc@gcc.gnu.org wrote: > > The following reply was made to PR c++/70; it has been noted by GNATS. > > From: rodrigc@gcc.gnu.org > To: gcc-gnats@gcc.gnu.org, jgeremia@princeton.edu, wanderer@rsu.ru, > martin@loewis.home.cs.tu-berlin.de, nobody@gcc.gnu.org > Cc: > Subject: Re: c++/70 > Date: 29 May 2001 02:31:42 -0000 > > Synopsis: template bug > > State-Changed-From-To: analyzed->closed > State-Changed-By: rodrigc > State-Changed-When: Mon May 28 19:31:42 2001 > State-Changed-Why: > Not legal C++. I don't know of any rule that makes this ill-formed (or not legal), even though referencing the operator may be ambiguous. operator*() along with many other binary operators may be defined either as a member, or as a non-member, or both (13.5.2). The simplified test case below compiles (with the friend being defined inline), which confirms that there is a bug (most other compilers also accept the code in the original test case). Regards Martin template <class T> struct S; template <class T> void operator* (S<T>, S<T>); template <class T> struct S { friend void operator*<> (S, S); // { } // okay void operator* (S) { } }; // template <class T> // void operator* (S<T>, S<T>) { } // error? not! S<int> s;
next reply other threads:[~2001-05-29 11:16 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-05-29 11:16 Martin Sebor [this message] -- strict thread matches above, loose matches on Subject: below -- 2001-05-29 12:06 c++/70 rodrigc 2001-05-28 19:36 c++/70 rodrigc
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=20010529181603.12340.qmail@sourceware.cygnus.com \ --to=sebor@roguewave.com \ --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).