From -3686955309746906500
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f78e5,eaeb4b8245d8b1d6
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2003-02-12 16:27:41 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!nycmny1-snf1.gtei.net!news.gtei.net!colt.net!kibo.news.demon.net!mutlu.news.demon.net!demon!mail2news.demon.co.uk!devnull
From: rogero@howzatt.demon.co.uk ("Roger Orr")
Newsgroups: comp.std.c++
Subject: Re: proposal?: template interfaces
Date: Thu, 13 Feb 2003 00:27:40 +0000 (UTC)
Organization: Or/2 Limited
Lines: 39
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <b2en88$bs1$1$8302bc10@news.demon.co.uk>
References: <23478c42.0302102345.244450c8@posting.google.com>
X-Trace: mail2news.demon.co.uk 1045096060 29553 10.0.0.1 (13 Feb 2003 00:27:40 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Thu, 13 Feb 2003 00:27:40 +0000 (UTC)
X-Received: from mulga.cs.mu.oz.au ([128.250.1.22])
	by news.demon.co.uk with esmtp (Exim 4.05)
	id 18j7E2-0007gW-00
	for mail2news@news.news.demon.net; Thu, 13 Feb 2003 00:27:38 +0000
X-Received: from localhost (localhost [[UNIX: localhost]]) by mulga.cs.mu.OZ.AU
	id LAA10606; Thu, 13 Feb 2003 11:27:34 +1100 (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++@ncar.ucar.edu
X-Newsgroups: comp.std.c++
X-NNTP-Posting-Date: Thu, 13 Feb 2003 00:01:13 +0000 (UTC)
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-Priority: 3
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MSMail-Priority: Normal
X-Spam-Status: No, hits=-5.2 required=5.0
	tests=INVALID_MSGID,NOSPAM_INC,PRIORITY_NO_NAME,
	      QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_01_02
	version=2.41
Xref: archiver1.google.com comp.std.c++:17934


<danielgutson@hotmail.com> wrote in message
news:23478c42.0302102345.244450c8@posting.google.com...
> Hi people,
>  I have a concern about templates. I will write this in a form of a
> proposal, but maybe I�m the only concerned about this. Please let me
> know.
>
> Overview & motivation:
>  When a class [for example of a library] is a template class, often it
> is not clear what the class will use from the template parameter.
> If you will provide such parameter, I would like to have a way of
> �seeing� what should I implement (before getting infinite complaining
> template instant.errors).

I agree with your analysis that the current situation can lead to hard to
diagnose compiler messages.

Unfortunately the language allows classes with 'flexible' restrictions,
using the fact that, in general, only methods which are used need to be
instantiable.
For example, operator->() in std::auto_ptr is only valid if -> is valid for
the template argument.

I'm not sure how your proposal would work with such classes.

Regards,
Roger Orr.
--
MVP in C++ at www.brainbench.com



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



