--- /usr/include/boost/iterator/zip_iterator.hpp 2008-04-05 01:44:45.000000000 +0200 +++ zip_iterator_2.hpp 2008-04-15 01:04:44.917959375 +0200 @@ -349,6 +349,38 @@ { }; + template + struct iterator_value_type + { + typedef typename iterator_traits::value_type type; + }; + +#ifdef BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT + // Hack because BOOST_MPL_AUX_LAMBDA_SUPPORT doesn't seem to work + // out well. Instantiating the nested apply template also + // requires instantiating iterator_traits on the + // placeholder. Instead we just specialize it as a metafunction + // class. + template<> + struct iterator_value_type + { + template + struct apply : iterator_value_type {}; + }; +#endif + + // Metafunction to obtain the type of the tuple whose element types + // are the reference types of an iterator tuple. + // + template + struct tuple_of_value_types + : tuple_impl_specific::tuple_meta_transform< + IteratorTuple, + iterator_value_type + > + { + }; + // Metafunction to obtain the minimal traversal tag in a tuple // of iterators. // @@ -414,8 +446,9 @@ typedef typename detail::tuple_of_references::type reference; - // Value type is the same as reference type. - typedef reference value_type; + // Value type is a tuple of the iterators' value_types + typedef typename + detail::tuple_of_value_types::type value_type; // Difference type is the first iterator's difference type typedef typename iterator_traits<