Boost logo

Boost Users :

From: rodrigo_braz (rodrigo_braz_at_[hidden])
Date: 2002-03-15 19:37:03


--- In Boost-Users_at_y..., Jon Kalb <kalb_at_L...> wrote:
> At 3:01 AM +0000 3/15/02, rodrigo_braz wrote:
> > copy(boost::make_filter_iterator<pair_is_active>(m.begin, m.end
()),
>
> copy(boost::make_filter_iterator<pair_is_active>(m.begin(), m.end
()),

Ouch. Ok, sorry about that. Actually my main problem with this
iterator is in the code below:

#include <vector>
#include "boost/iterator_adaptors.hpp"

using namespace std;
using namespace boost;

struct is_active {
  bool operator()(int p) { return 0 < p; }
};

struct A
{
  typedef
filter_iterator_generator<is_active,vector<int>::iterator>::type
active_iterator;
  active_iterator i; // PROBLEM
};

int main()
{
  A a;
  return 0;
}

I get the error messages:

15: Type name expected
15: Multiple declaration for 'A::active_iterator'
14: Earlier declaration of 'A::active_iterator'
15: Declaration missing ;

Thanks,

Rodrigo


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net