Boost logo

Boost :

From: Kevlin Henney (kevlin_at_[hidden])
Date: 2000-03-16 10:35:17


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
____________________________________________________________


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