From -8976441049507559014
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,94948bbb031f36b
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2002-09-23 04:41:26 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!kibo.news.demon.net!mutlu.news.demon.net!demon!mail2news.demon.co.uk!devnull
From: anthwil@nortelnetworks.com ("Anthony Williams")
Newsgroups: comp.std.c++
Subject: Re: how to define a template function with a templatized parameter
Date: Mon, 23 Sep 2002 11:41:25 +0000 (UTC)
Organization: Nortel
Lines: 26
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <ptv5f3ag.fsf@nortelnetworks.com>
References: <3D8D2E06.9D30B9D@optech.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: mail2news.demon.co.uk 1032781285 27528 10.0.0.1 (23 Sep 2002 11:41:25 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Mon, 23 Sep 2002 11:41:25 +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 17tRae-00079q-00
	for mail2news@news.news.demon.net; Mon, 23 Sep 2002 11:41:24 +0000
X-Received: from localhost (localhost [[UNIX: localhost]]) by mulga.cs.mu.OZ.AU
	id VAA19718; Mon, 23 Sep 2002 21:41:21 +1000 (EST)
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-Authentication-Warning: bcarh8ab.ca.nortel.com: news set sender to anthwil@nortelnetworks.com using -f
X-Newsgroups: comp.std.c++
X-User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Informed Management (Windows [1]))
Xref: archiver1.google.com comp.std.c++:14117

jrowe@optech.com (john) writes:

> Can someone tell if it is possible and if so how to declare a template
> function that has a template
> parameter that is an instance of a template class. I would like to
> create a function that would
> take a container class and a type as specified template types. Whether
> this is is efficient, good
> form, impractical or not I am not concerned. I am just interested in
> whether it can be done and
> if so how.

template< template<class> class C,class T> void foo(C<T>& const);

The args of the template template-parameter are just to specify whether the
allowed templates have type or non-type parameters, and how many --- their
names are ignored.

Anthony

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



