Index: libs/iterator/test/zip_iterator_test.cpp =================================================================== --- libs/iterator/test/zip_iterator_test.cpp (revision 57970) +++ libs/iterator/test/zip_iterator_test.cpp (working copy) @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include #include @@ -104,32 +104,32 @@ typedef boost::zip_iterator< - boost::tuples::tuple< + boost::fusion::tuple< std::set::iterator , std::vector::iterator > > zit_mixed; zit_mixed zip_it_mixed = zit_mixed( - boost::make_tuple( + boost::fusion::make_tuple( intset.begin() , vect1.begin() ) ); - boost::tuples::tuple val_tuple( + boost::fusion::tuple val_tuple( *zip_it_mixed); - boost::tuples::tuple ref_tuple( + boost::fusion::tuple ref_tuple( *zip_it_mixed); - double dblOldVal = boost::tuples::get<1>(ref_tuple); - boost::tuples::get<1>(ref_tuple) -= 41.; + double dblOldVal = boost::fusion::get<1>(ref_tuple); + boost::fusion::get<1>(ref_tuple) -= 41.; - if( 52 == boost::tuples::get<0>(val_tuple) && - 42. == boost::tuples::get<1>(val_tuple) && - 52 == boost::tuples::get<0>(ref_tuple) && - 1. == boost::tuples::get<1>(ref_tuple) && + if( 52 == boost::fusion::get<0>(val_tuple) && + 42. == boost::fusion::get<1>(val_tuple) && + 52 == boost::fusion::get<0>(ref_tuple) && + 1. == boost::fusion::get<1>(ref_tuple) && 1. == *vect1.begin() ) { @@ -143,7 +143,7 @@ } // Undo change to vect1 - boost::tuples::get<1>(ref_tuple) = dblOldVal; + boost::fusion::get<1>(ref_tuple) = dblOldVal; ///////////////////////////////////////////////////////////////////////////// // @@ -185,9 +185,9 @@ ve4.push_back(12); // typedefs for cons lists of iterators. - typedef boost::tuples::cons< + typedef boost::fusion::cons< std::set::iterator, - boost::tuples::tuple< + boost::fusion::tuple< std::vector::iterator, std::list::iterator, std::set::iterator, @@ -201,16 +201,16 @@ >::inherited > cons_11_its_type; // - typedef boost::tuples::cons< + typedef boost::fusion::cons< std::list::const_iterator, cons_11_its_type > cons_12_its_type; // typedefs for cons lists for dereferencing the zip iterator // made from the cons list above. - typedef boost::tuples::cons< + typedef boost::fusion::cons< const int&, - boost::tuples::tuple< + boost::fusion::tuple< int&, int&, const int&, @@ -224,7 +224,7 @@ >::inherited > cons_11_refs_type; // - typedef boost::tuples::cons< + typedef boost::fusion::cons< const int&, cons_11_refs_type > cons_12_refs_type; @@ -238,7 +238,7 @@ li1.begin(), cons_11_its_type( se1.begin(), - boost::make_tuple( + boost::fusion::make_tuple( ve1.begin(), li2.begin(), se2.begin(), @@ -256,16 +256,16 @@ // Dereference, mess with the result a little. cons_12_refs_type zip_it_12_dereferenced(*zip_it_12); - boost::tuples::get<9>(zip_it_12_dereferenced) = 42; + boost::fusion::get<9>(zip_it_12_dereferenced) = 42; // Make a copy and move it a little to force some instantiations. zip_it_12_type zip_it_12_copy(zip_it_12); ++zip_it_12_copy; - if( boost::tuples::get<11>(zip_it_12.get_iterator_tuple()) == ve4.begin() && - boost::tuples::get<11>(zip_it_12_copy.get_iterator_tuple()) == ve4.end() && - 1 == boost::tuples::get<0>(zip_it_12_dereferenced) && - 12 == boost::tuples::get<11>(zip_it_12_dereferenced) && + if( boost::fusion::get<11>(zip_it_12.get_iterator_tuple()) == ve4.begin() && + boost::fusion::get<11>(zip_it_12_copy.get_iterator_tuple()) == ve4.end() && + 1 == boost::fusion::get<0>(zip_it_12_dereferenced) && + 12 == boost::fusion::get<11>(zip_it_12_dereferenced) && 42 == *(li4.begin()) ) { @@ -293,51 +293,51 @@ vect2[2] = 4.4; boost::zip_iterator< - boost::tuples::tuple< + boost::fusion::tuple< std::vector::const_iterator, std::vector::const_iterator > > zip_it_begin( - boost::make_tuple( + boost::fusion::make_tuple( vect1.begin(), vect2.begin() ) ); boost::zip_iterator< - boost::tuples::tuple< + boost::fusion::tuple< std::vector::const_iterator, std::vector::const_iterator > > zip_it_run( - boost::make_tuple( + boost::fusion::make_tuple( vect1.begin(), vect2.begin() ) ); boost::zip_iterator< - boost::tuples::tuple< + boost::fusion::tuple< std::vector::const_iterator, std::vector::const_iterator > > zip_it_end( - boost::make_tuple( + boost::fusion::make_tuple( vect1.end(), vect2.end() ) ); if( zip_it_run == zip_it_begin && - 42. == boost::tuples::get<0>(*zip_it_run) && - 2.2 == boost::tuples::get<1>(*zip_it_run) && - 43. == boost::tuples::get<0>(*(++zip_it_run)) && - 3.3 == boost::tuples::get<1>(*zip_it_run) && - 44. == boost::tuples::get<0>(*(++zip_it_run)) && - 4.4 == boost::tuples::get<1>(*zip_it_run) && + 42. == boost::fusion::get<0>(*zip_it_run) && + 2.2 == boost::fusion::get<1>(*zip_it_run) && + 43. == boost::fusion::get<0>(*(++zip_it_run)) && + 3.3 == boost::fusion::get<1>(*zip_it_run) && + 44. == boost::fusion::get<0>(*(++zip_it_run)) && + 4.4 == boost::fusion::get<1>(*zip_it_run) && zip_it_end == ++zip_it_run ) { @@ -361,12 +361,12 @@ if( zip_it_run == zip_it_end && zip_it_end == zip_it_run-- && - 44. == boost::tuples::get<0>(*zip_it_run) && - 4.4 == boost::tuples::get<1>(*zip_it_run) && - 43. == boost::tuples::get<0>(*(--zip_it_run)) && - 3.3 == boost::tuples::get<1>(*zip_it_run) && - 42. == boost::tuples::get<0>(*(--zip_it_run)) && - 2.2 == boost::tuples::get<1>(*zip_it_run) && + 44. == boost::fusion::get<0>(*zip_it_run) && + 4.4 == boost::fusion::get<1>(*zip_it_run) && + 43. == boost::fusion::get<0>(*(--zip_it_run)) && + 3.3 == boost::fusion::get<1>(*zip_it_run) && + 42. == boost::fusion::get<0>(*(--zip_it_run)) && + 2.2 == boost::fusion::get<1>(*zip_it_run) && zip_it_begin == zip_it_run ) { @@ -389,7 +389,7 @@ << std::flush; boost::zip_iterator< - boost::tuples::tuple< + boost::fusion::tuple< std::vector::const_iterator, std::vector::const_iterator > @@ -642,8 +642,8 @@ // Note: zip_it_run and zip_it_run_copy are both at // begin plus one. // - if( boost::tuples::get<0>(zip_it_run.get_iterator_tuple()) == vect1.begin() + 1 && - boost::tuples::get<1>(zip_it_run.get_iterator_tuple()) == vect2.begin() + 1 + if( boost::fusion::get<0>(zip_it_run.get_iterator_tuple()) == vect1.begin() + 1 && + boost::fusion::get<1>(zip_it_run.get_iterator_tuple()) == vect2.begin() + 1 ) { ++num_successful_tests; @@ -664,18 +664,18 @@ std::cout << "Making zip iterators: " << std::flush; - std::vector > + std::vector > vect_of_tuples(3); std::copy( boost::make_zip_iterator( - boost::make_tuple( + boost::fusion::make_tuple( vect1.begin(), vect2.begin() ) ), boost::make_zip_iterator( - boost::make_tuple( + boost::fusion::make_tuple( vect1.end(), vect2.end() ) @@ -683,12 +683,12 @@ vect_of_tuples.begin() ); - if( 42. == boost::tuples::get<0>(*vect_of_tuples.begin()) && - 2.2 == boost::tuples::get<1>(*vect_of_tuples.begin()) && - 43. == boost::tuples::get<0>(*(vect_of_tuples.begin() + 1)) && - 3.3 == boost::tuples::get<1>(*(vect_of_tuples.begin() + 1)) && - 44. == boost::tuples::get<0>(*(vect_of_tuples.begin() + 2)) && - 4.4 == boost::tuples::get<1>(*(vect_of_tuples.begin() + 2)) + if( 42. == boost::fusion::get<0>(*vect_of_tuples.begin()) && + 2.2 == boost::fusion::get<1>(*vect_of_tuples.begin()) && + 43. == boost::fusion::get<0>(*(vect_of_tuples.begin() + 1)) && + 3.3 == boost::fusion::get<1>(*(vect_of_tuples.begin() + 1)) && + 44. == boost::fusion::get<0>(*(vect_of_tuples.begin() + 2)) && + 4.4 == boost::fusion::get<1>(*(vect_of_tuples.begin() + 2)) ) { ++num_successful_tests; @@ -710,39 +710,39 @@ << std::flush; boost::zip_iterator< - boost::tuples::tuple< + boost::fusion::tuple< std::set::const_iterator, std::vector::const_iterator > > zip_it_const( - boost::make_tuple( + boost::fusion::make_tuple( intset.begin(), vect2.begin() ) ); // boost::zip_iterator< - boost::tuples::tuple< + boost::fusion::tuple< std::set::iterator, std::vector::const_iterator > > zip_it_half_const( - boost::make_tuple( + boost::fusion::make_tuple( intset.begin(), vect2.begin() ) ); // boost::zip_iterator< - boost::tuples::tuple< + boost::fusion::tuple< std::set::iterator, std::vector::iterator > > zip_it_non_const( - boost::make_tuple( + boost::fusion::make_tuple( intset.begin(), vect2.begin() ) @@ -753,10 +753,10 @@ ++zip_it_const; // zip_it_non_const = ++zip_it_const; // Error: can't convert from const to non-const - if( 54 == boost::tuples::get<0>(*zip_it_const) && - 4.4 == boost::tuples::get<1>(*zip_it_const) && - 53 == boost::tuples::get<0>(*zip_it_half_const) && - 3.3 == boost::tuples::get<1>(*zip_it_half_const) + if( 54 == boost::fusion::get<0>(*zip_it_const) && + 4.4 == boost::fusion::get<1>(*zip_it_const) && + 53 == boost::fusion::get<0>(*zip_it_half_const) && + 3.3 == boost::fusion::get<1>(*zip_it_half_const) ) { ++num_successful_tests; @@ -794,7 +794,7 @@ // traversal. // typedef boost::zip_iterator< - boost::tuples::tuple< + boost::fusion::tuple< std::vector::const_iterator, std::vector::const_iterator >