public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Philip Martin <philip_martin@ntlworld.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org Subject: Re: libstdc++/4051 is not a bug Date: Thu, 30 Aug 2001 13:36:00 -0000 [thread overview] Message-ID: <20010830203601.30485.qmail@sourceware.cygnus.com> (raw) The following reply was made to PR libstdc++/4051; it has been noted by GNATS. From: Philip Martin <philip_martin@ntlworld.com> To: gcc-gnats@gcc.gnu.org, ola@cs.duke.edu, gcc-bugs@gcc.gnu.org Cc: Subject: Re: libstdc++/4051 is not a bug Date: 30 Aug 2001 21:31:07 +0100 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=4051&database=gcc You have implemented the output operator for std::pair<int,int> in the global namespace, but you are attempting to use it via std::copy in the std namespace. Only the std namespace will be searched for an output operator. The complier correctly reports no match. Argument-dependent name lookup (3.4.2 [basic.lookup.koenig]) for a template id applies to the search for the output operator, allowing the output operator to be defined in the same namespace as the template or the template arguments. Thus when one of the std::pair is of class type, the namespace of the class will also be searched and so you have no problem. Philip
reply other threads:[~2001-08-30 13:36 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20010830203601.30485.qmail@sourceware.cygnus.com \ --to=philip_martin@ntlworld.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).