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

Jeff Paquette
paquette_at_[hidden], paquette_at_[hidden]
-----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@[]>, Andrew D Jewell
<ajewell_at_[hidden]> writes
>class B {
>    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
                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 Install now:
-- Easily schedule meetings and events using the group calendar!

Boost list run by bdawes at, gregod at, cpdaniel at, john at