Boost logo

Boost Users :

From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2002-02-19 03:02:25


I just tried your code with gcc-2.95.3 as well as gcc-3.0.3 and no
problems there.
Looking at the status page, the iterator_adaptors test, which includes a
test for the permutation_iterator, compiles fine with VC++ 6.0 SP5. I
don't use windows though so that's all I can say at this point.

I do want to add that, if your compilation succeeds, you will have a
runtime error. The only index you have is '1' although the elements
container is of size() 1 (and thus the only valid index is zero)

Jeff Flinn - wwnet wrote:

> I'm trying to use the Permutation Iterator adaptor on MSV++ w/SP5 with
> boost_1_27_0. Below is a simplification of the example on the web site,
> which results in the compiler error found below function main: Any ideas?
>
> #include <list>
> #include <vector>
> #include <boost/permutation_iterator.hpp>
>
> int main(int argc, char* argv[])
> {
> typedef std::vector < int > tElements; typedef
> tElements::iterator tEItr;
> typedef std::list < int > tIdxs; typedef
> tIdxs::iterator tIItr;
> typedef std::ostream_iterator< int > tOItr;
>
> tElements elements( 1, 1 );
> tIdxs indices ( 1, 1 );
>
> typedef boost::permutation_iterator_generator< tEItr, tIItr >::type
> tPItr;
>
> tPItr begin = boost::make_permutation_iterator( elements.begin(),
> indices.begin() );
>
> int val = *begin;
>
> return 0;
> }
>
> error C2440: 'initializing' : cannot convert
> from 'struct boost::detail::iterator_traits_::undefined<void>'
> to 'int'
> Source or target has incomplete type
>


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