This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: PR 4051
- To: Craig Rodrigues <rodrigc at mediaone dot net>
- Subject: Re: PR 4051
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 22 Aug 2001 07:49:16 -0300
- Cc: libstdc++ at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <20010817223319.A16086@mediaone.net>
On Aug 17, 2001, Craig Rodrigues <rodrigc@mediaone.net> wrote:
> Does anyone know why gcc 3.x complains about this?
Hmm... Here's a theory:
Since ostream_iterator is defined in namespace std, the context in
which the expression that outputs a pair to the ostream is that
namespace, where a number of operator<<s that hide the definition in
the global namespace exist. Since the argumetns have type
std::ostream and std::pair<int,int>, Koenig lookup only searches
namespace std too. So, the definition of ::operator<< isn't
considered. Does this make sense to anyone?
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me