From 6241294702297194960
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f78e5,b54cf208661f77da,start
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2003-07-14 14:58:59 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!kibo.news.demon.net!mutlu.news.demon.net!demon!mail2news.demon.co.uk!devnull
From: daniel.frey@aixigo.de (Daniel Frey)
Newsgroups: comp.std.c++
Subject: About DR 372
Date: Mon, 14 Jul 2003 21:58:59 +0000 (UTC)
Organization: WESTEND GmbH - Aachen (+49 241 7013330)
Lines: 50
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <betvg2$d4u$1@swifty.westend.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Trace: mail2news.demon.co.uk 1058219939 24484 10.0.0.1 (14 Jul 2003 21:58:59 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Mon, 14 Jul 2003 21:58:59 +0000 (UTC)
X-Received: from mulga.cs.mu.oz.au ([128.250.1.22])
	by news.demon.co.uk with esmtp (Exim 4.12)
	id 19cBLV-0006Ml-00
	for mail2news@news.news.demon.net; Mon, 14 Jul 2003 21:58:58 +0000
X-Received: from localhost (localhost [[UNIX: localhost]]) by mulga.cs.mu.OZ.AU
	id HAA24781; Tue, 15 Jul 2003 07:58:55 +1000 (EST)
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Path: comp-std-cpp-robomod!not-for-mail
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Delivered-To: std-c++@ucar.edu
X-Newsgroups: comp.std.c++
X-User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312
X-Accept-Language: en-us, en
X-Spam-Status: No, hits=-1.8 required=5.0
	tests=INVALID_MSGID,NOSPAM_INC,SPAM_PHRASE_03_05,USER_AGENT,
	      USER_AGENT_MOZILLA_UA,X_ACCEPT_LANG
	version=2.41
X-MIME-Autoconverted: from quoted-printable to 8bit by mulga.cs.mu.OZ.AU id UAA22795
X-MIME-Autoconverted: from 8bit to quoted-printable by mulga.cs.mu.OZ.AU id HAA24781
Xref: archiver1.google.com comp.std.c++:20097

I just read DR 372 and I think that the problem presented is not really=20
discussed/solved properly. Consider this example:

class A {
protected:
   typedef int N;
};

template< typename T >
class B
{};

template< typename U >
class C : public U, public B< typename U::N >
{};

C< A > x;

The question is: If C is derived from A as above, is it allowed to=20
access A::N before the classes opening '{'?

The main problem is that you need to access U's protected parts in C's=20
base-clause. This pattern is common when using policies, Andrei's Loki=20
library was bitten by it as he tried to make some parts of the policies=20
'protected' but some compilers rejected the code. They were right to=20
reject it, I think it's 11.4/2 that applies here and prevents the code=20
above to be legal, although it addresses a different and reasonable=20
example. To me, it seems wrong to reject the code as it is perfectly=20
reasonable to write such stuff. The questions are:

- Do you agree it's reasonable?
- Is it a DR or is it a request for an extension?
- Is DR 372 the right place to address it or shall it be a new DR?

Regards, Daniel

--=20
Daniel Frey

aixigo AG - financial training, research and technology
Schlo=DF-Rahe-Stra=DFe 15, 52072 Aachen, Germany
fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99
eMail: daniel.frey@aixigo.de, web: http://www.aixigo.de

---
[ 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                       ]



