From 5339331189190184642
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,a615cd43626d4d92
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2004-03-19 11:47:52 PST
Path: archiver1.google.com!news1.google.com!news.glorb.com!newsrout1.ntli.net!news.ntli.net!kibo.news.demon.net!mutlu.news.demon.net!demon!mail2news.demon.co.uk!devnull
From: bop@gmb.dk ("Bo Persson")
Newsgroups: comp.std.c++
Subject: Re: Proposal for a <stdfwd> header
Date: Fri, 19 Mar 2004 19:47:51 +0000 (UTC)
Lines: 47
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <c3f9u1$27gvec$1@ID-206811.news.uni-berlin.de>
References: <d522680b.0403151302.6f276691@posting.google.com> <Fqt5c.20332$Fh4.9967@twister.nyroc.rr.com> <c3bni4$f5a$1@newshispeed.ch>
X-Trace: mail2news.demon.co.uk 1079725672 8774 10.0.0.1 (19 Mar 2004 19:47:52 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Fri, 19 Mar 2004 19:47:52 +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 1B4PyB-0002HK-00
	for mail2news@news.news.demon.net; Fri, 19 Mar 2004 19:47:51 +0000
X-Received: from mulga.cs.mu.OZ.AU (localhost [127.0.0.1]) by mulga.cs.mu.OZ.AU with ESMTP
	id i2JJlhi2002540; Sat, 20 Mar 2004 06:47:43 +1100 (EST)
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id i2JJlgQS002531;
	Sat, 20 Mar 2004 06:47:42 +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++@ucar.edu
X-Newsgroups: comp.std.c++
X-Orig-NNTP-Posting-Host: c-faf371d5.443-1-64736c14.cust.bredbandsbolaget.se (213.113.243.250)
X-Orig-X-Trace: news.uni-berlin.de 1079716609 75005388 I 213.113.243.250 ([206811])
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
X-Spam-Checker-Version: SpamAssassin 2.60-mulga_r1 (1.212-2003-09-23-exp) on 
	mulga.cs.mu.OZ.AU
X-Spam-Status: No, hits=0.7 required=5.2 tests=PRIORITY_NO_NAME autolearn=no 
	version=2.60-mulga_r1
Xref: archiver1.google.com comp.std.c++:1362


""Ivan Vecerina"" <please_use_webform@vecerina.com> skrev i meddelandet
news:c3bni4$f5a$1@newshispeed.ch...
> "Jorge Rivera" <jorgeri@rochester.rr.com> wrote in message
> news:Fqt5c.20332$Fh4.9967@twister.nyroc.rr.com...
> > > // using the proposed header...
> > > #include <stdfwd>
> > >
> > > class ISeek{
> > > public:
> > >   virtual void seek_knowledge(const std::string& token) = 0;
> > >   virtual void seek_advice(const std::vector<std::string>& advisers) =
> 0;
> > > };
> >
> > I know nothing of any standard limitation.  But I think forward
> > declaring templated classes is not trivial.
>
> Actually, it is mostly the same as for non-template classes:
> you omit the body of the class definition, and that's it.
>
> > This could be my own question, but is there an effective way of
> > forward-declaring templated functions?  If not, does it make any sense
> > in allowing it?
>
> It is easy to do, but it cannot be done for standard classes,
> because mere users cannot make all required assumptions about
> the default parameters of standard templates (or even IIRC
> about the potential additional parameters).

One problem is that it is not allowed to redeclare the default template
parameters. This means that if you forward declare the templates, the
regular headers must somehow include the forward declarations and then not
declare the parameter values themselves.

Hard to fix for a user.  :-)


Bo Persson


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



