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
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