From -1079517844083419779
X-Google-Thread: f78e5,da2d794619b2b9b1
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Return-Path: <devnull@stump.algebra.com>
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
Path: g2news1.google.com!news1.google.com!news.maxwell.syr.edu!news.alt.net!comp-std-cpp-robomod!not-for-mail
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
Delivered-To: std-c++@ucar.edu
From: Nicola.Musatti@ObjectWay.it
Newsgroups: comp.std.c++
Subject: Re: class namespaces (N1420): What is the current status?
Organization: http://groups.google.com
Message-ID: <1104746855.029601.159670@z14g2000cwz.googlegroups.com>
References: <1103711703.043110.236140@f14g2000cwb.googlegroups.com>
   <41d6a557$0$51246$14726298@news.sunsite.dk>
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1104746860 11676 127.0.0.1 (3 Jan 2005 10:07:40 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 3 Jan 2005 10:07:40 +0000 (UTC)
User-Agent: G2/0.2
Complaints-To: groups-abuse@google.com
Injection-Info: z14g2000cwz.googlegroups.com; posting-host=212.239.118.101;
   posting-account=iTIzNQwAAAAwRVmdnvvxYuGS-bB7DtnO
X-Spamscanner: mailbox4.ucsd.edu  (v1.5 Dec  3 2004 17:34:44, -2.6/5.0 3.0.0)
X-MailScanner: PASSED (v1.2.8 92728 j03A7gxK095527 mailbox4.ucsd.edu)
X-Virus-Scanned: by amavisd-new at cs.mu.OZ.AU
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
X-Virus-Scanned: by amavisd-new at cs.mu.OZ.AU
Date: Mon,  3 Jan 2005 11:33:55 CST
Xref: g2news1.google.com comp.std.c++:3788


Thorsten Ottosen wrote:
> <Nicola.Musatti@ObjectWay.it> wrote in message
> news:1103711703.043110.236140@f14g2000cwb.googlegroups.com...
[...]
> | An alternative would be to allow a plain 'R' to implicitly refer to
> | C<T>::R, but I regard this as an undesirable potential source of
> | ambiguities.
>
> ok. why?

Consider the present syntax; if I write

template <typename T>
R C<T>::f() { return 42; }

R as a return type can never refer to C<T>::R . With the proposed
syntax if I write

template <typename T> namespace class C {
R f() { return 42; }
}

It is not obvious whether R refers to C<T>::R or to another R. Making R
refer by default to C<T>::R would make it necessary to qualify a type
hidden by R.

When all's said and done a decision should be made on whether name
lookup in class namespaces works exactly as within class definitions or
whether it should be preferable that they keep as close as possible to
the current syntax.

Cheers,
Nicola Musatti

---
[ 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://www.jamesd.demon.co.uk/csc/faq.html                       ]



