From -4607462436719221608
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f78e5,e5c2db50725662d
X-Google-Attributes: gidf78e5,public
From: Martin von Loewis <loewis@informatik.hu-berlin.de>
Subject: Re: Problem with using typedef in a namespace
Date: 1999/05/07
Message-ID: <p6qwvymx7s9.fsf@pandora.inst-inf-1.hu-berlin.de>#1/1
X-Deja-AN: 475171741
Content-Transfer-Encoding: quoted-printable
Approved: Valentin Bonnard <bonnard@clipper.ens.fr>
References: <925941289.21893.0.nnrp-01.9e98df50@news.demon.co.uk>
X-Original-Date: 06 May 1999 22:28:06 +0200
Content-Type: text/plain; charset=ISO-8859-1
Organization: Humboldt-University Berlin, Department of Computer Science
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBVAwUANzL3V6wEuYhIxRhxAQGNnAH/XRQPWiFYltprMNBsBmSoZNcI8Fknw9Pu b9uCv0sR7z02CwdgULg8BB3G4oj58cx8aOhIjsw9CPV8vxxKPkaUcA== =kn6f
Mime-Version: 1.0 (generated by tm-edit 7.106)
Newsgroups: comp.std.c++

"Kit Smithers" <kitsnews@kits.demon.co.uk> writes:

> Can anyone give me an indication -- or which bit of the standard I should
> read -- as to what's going on?

I recommend 3.4.2 "Argument=ADdependent name lookup". This is the
procedure commonly called "Koenig lookup". When the compiler searches
for operator<<, it normally wouldn't find your operators, since they
are in a namespace, and you have no using directives or the like.

With Koenig lookup, the compiler will also look into CSS when an
argument is of type Byte_Stream_CSS. For Byte_Stream_GLOBAL, it will
only look in the global namespace. The existence of typedefs doesn't
matter at all.

Hope this helps,
Martin
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]



