Boost logo

Boost :

From: Joel Young (jdy_at_[hidden])
Date: 2001-10-31 11:44:36


The iterator_adaptor_examples.cpp doesn't compile using
gcc-2.95.3 or gcc-3.0.1 under either Linux or Solaris.

here are the error messages:

2.95.3:

iterator_adaptor_examples.cpp: In function `int main(int, char **)':
iterator_adaptor_examples.cpp:26: ANSI C++ forbids declaration `transform_iterator' with no type
iterator_adaptor_examples.cpp:26: template-id `transform_iterator<main(int, char **)::Function, int *, boost::iterator<random_access_iterator_tag,int,int,int *,int &> >' used as a declarator
iterator_adaptor_examples.cpp:26: parse error before `::'
iterator_adaptor_examples.cpp:28: `doubling_iterator' undeclared (first use this function)
iterator_adaptor_examples.cpp:28: (Each undeclared identifier is reported only once
iterator_adaptor_examples.cpp:28: for each function it appears in.)
iterator_adaptor_examples.cpp:32: `i' undeclared (first use this function)
iterator_adaptor_examples.cpp:32: `i_end' undeclared (first use this function)

3.0.1:

iterator_adaptor_examples.cpp: In function `int main(int, char**)':
iterator_adaptor_examples.cpp:26: ISO C++ forbids declaration of
   `transform_iterator' with no type
iterator_adaptor_examples.cpp:26: template-id `transform_iterator<int main(int,
   char**)::Function, int*, boost::iterator<std::random_access_iterator_tag,
   int, ptrdiff_t, int*, int&> >' used as a declarator
iterator_adaptor_examples.cpp:26: parse error before `::' token
iterator_adaptor_examples.cpp:28: `doubling_iterator' undeclared (first use
   this function)
iterator_adaptor_examples.cpp:28: (Each undeclared identifier is reported only
   once for each function it appears in.)
iterator_adaptor_examples.cpp:32: `i' undeclared (first use this function)
iterator_adaptor_examples.cpp:32: `i_end' undeclared (first use this function)

any suggestions?

Joel
jdy_at_[hidden]


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