Boost logo

Boost :

From: Jeffrey D. Paquette (paquette_at_[hidden])
Date: 2000-03-16 10:44:59


I'll admit to being dense here.. could you explain the member template
technique further, or provide a reference that I could read? How does this
help?

--
Jeff Paquette
paquette_at_[hidden], paquette_at_[hidden]
http://www.atnetsend.net
-----Original Message-----
From: Kevlin Henney [mailto:kevlin_at_[hidden]]
Sent: Thursday, March 16, 2000 10:35 AM
To: boost_at_[hidden]
Cc: accu-general_at_[hidden]
Subject: [boost] Re: How to avoid including <vector>
In message <p04310100b4f6a22464d0@[24.29.6.251]>, Andrew D Jewell
<ajewell_at_[hidden]> writes
[...]
>class B {
>public:
>    void f(const vector<A> & inList);
>};
[...]
>To reduce compile time, I would like to avoid saying
>
>#include <vector>
[...]
>As I see it, my choices include
>
>1) Just include <vector> and stop whining
>2) Change the signature to f(const A * inList, int inListLength)
>3) Create my own non-portable <stlfwd> which is like <iosfwd> but for
>stl types.
4) Avoid the issue completely and avoid the restriction on using only
vector by using member templates:
        class B
        {
        public:
                template<typename iterator>
                  void f(iterator begin, iterator end);
                ...
        };
____________________________________________________________
  Kevlin Henney                       Curbralan Ltd
  kevlin_at_[hidden]                +44 (0) 7801 073 508
____________________________________________________________
------------------------------------------------------------------------
@Backup- Protect and Access your data any time, any where on the net.
Try @Backup FREE and recieve 300 points from mypoints.com Install now:
http://click.egroups.com/1/2345/1/_/9351/_/953221100/
-- Easily schedule meetings and events using the group calendar!
-- http://www.egroups.com/cal?listname=boost&m=1

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk