From 4448332151488998174
X-Google-Thread: f78e5,33c1ffa960d55699
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news1.google.com!news.maxwell.syr.edu!feed.news.tiscali.de!newsfeed.vmunix.org!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull
From: kon@iki.fi (Kalle Olavi Niemitalo)
Newsgroups: comp.std.c++
Subject: Re: Suggestion: parent
Date: Thu, 12 May 2005 06:06:53 GMT
Organization: Oulun Puhelin Oyj - Baana
Lines: 25
Sender: mail2news@demon.net
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <87sm0t3vli.fsf@Astalo.kon.iki.fi>
References: <4280298A.6090305@usq.edu.au> <2NXfe.4884$eU.970@fed1read07>
 <20050510120102.A34CF780A4@mscan4.ucar.edu>
NNTP-Posting-Host: news.news.demon.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7BIT
X-Trace: news.demon.co.uk 1115878018 26772 158.152.254.254 (12 May 2005 06:06:58 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Thu, 12 May 2005 06:06:58 +0000 (UTC)
X-OPOY-MailScanner-SpamCheck: not spam, SpamAssassin (score=1.426,	required 5,
 AWL -0.37, UNWANTED_LANGUAGE_BODY 1.80)
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux)
X-OPOY-MailScanner-Information: Please contact the OPOY for more information
X-Virus-Scanned: by amavisd-new at cs.mu.OZ.AU
X-OPOY-MailScanner-SpamScore: s
X-Cancel-Lock: sha1:Ym6TN+28E+4ankpFU5iF1dsdMoE=
X-Path: comp-std-cpp-robomod!not-for-mail
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id j4C66rQJ013172;
	Thu, 12 May 2005 16:06:53 +1000 (EST)
X-OPOY-MailScanner: Not virus scanned: please contact OPOY for details
X-NNTP-posting-date: Thu, 12 May 2005 04:56:03 +0000 (UTC)
X-Delivered-To: std-c++@ucar.edu
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-MailScanner-From: news@plaza.suomi.net
X-Accept-Language: fi;q=1.0, en;q=0.9, sv;q=0.5, de;q=0.1
X-Keywords: SFINAE
X-Newsgroups: comp.std.c++
Xref: g2news1.google.com comp.std.c++:4708

hyrosen@mail.com (Hyman Rosen) writes:

> It's the MI case where this is most useful, but complicated template
> base classes could use the help as well. I don't see anything all that
> difficult - simply let inherited<N> be the (N+1)th direct base class,
> and let inherited::name be the name found by lookup as if name were not
> defined in the derived class.

How would you use inherited<N> in practice?  I presume you
wouldn't write e.g. inherited<2> directly, but would instead get
the N from somewhere else: inherited<refcount_base_index>.
However, I expect it would be easier and more maintainable to
just use a typedef in that case.

Or were you going to loop over all direct base classes at compile
time?  Then you'd also need to know how many there are... it may
be possible to find that out with some ugly templates and SFINAE,
but I'd hate to have a new feature whose use requires that.

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



