From -2153885573280557095
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,94948bbb031f36b
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2002-09-23 07:37:47 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!skynet.be!skynet.be!kibo.news.demon.net!mutlu.news.demon.net!demon!mail2news.demon.co.uk!devnull
From: francis.glassborow@ntlworld.com (Francis Glassborow)
Newsgroups: comp.std.c++
Subject: Re: how to define a template function with a templatized parameter
Date: Mon, 23 Sep 2002 14:37:46 +0000 (UTC)
Organization: Southfield Microcomputer SS
Lines: 36
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <m0V8J7A7gwj9EwTk@robinton.demon.co.uk>
References: <3D8D2E06.9D30B9D@optech.com> <ptv5f3ag.fsf@nortelnetworks.com>
Mime-Version: 1.0
Content-Type: text/plain;charset=us-ascii;format=flowed
X-Trace: mail2news.demon.co.uk 1032791866 28565 10.0.0.1 (23 Sep 2002 14:37:46 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Mon, 23 Sep 2002 14:37:46 +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 17tULI-0007Qa-00
	for mail2news@news.news.demon.net; Mon, 23 Sep 2002 14:37:45 +0000
X-Received: by mulga.cs.mu.OZ.AU
	id AAA00418; Tue, 24 Sep 2002 00:37:40 +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++@ncar.ucar.edu
X-Reply-To: Francis Glassborow <francisG@robinton.demon.co.uk>
X-Newsgroups: comp.std.c++
X-User-Agent: Turnpike/6.01-U (<TilyaeicE$WmMOP9F8P4$y3lmP>)
Xref: archiver1.google.com comp.std.c++:14122

In article <ptv5f3ag.fsf@nortelnetworks.com>, Anthony Williams 
<anthwil@nortelnetworks.com> writes
>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.

However, in order to do it you need a compiler that handles template 
template parameters.


-- 
Francis Glassborow      ACCU
64 Southfield Rd
Oxford OX4 1PA          +44(0)1865 246490
All opinions are mine and do not represent those of any organisation

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



