|
Boost Users : |
From: Dalton, Barnaby (Barnaby.Dalton_at_[hidden])
Date: 2005-07-14 02:36:21
I tried the same code with the CVS version and it compiled fine.
Thanks
Barney
-----Original Message-----
From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of David Abrahams
Sent: Friday 08 July 2005 16:23
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] Compile errors using make_zip_iterator
"Dalton, Barnaby" <Barnaby.Dalton_at_[hidden]> writes:
> I'm using MSVC 7.1 and am getting masses of compile errors with the
> following code (see end of message for the errors):
>
> #include <boost/iterator/zip_iterator.hpp>
> #include <vector>
> #include <functional>
> #include <boost/detail/workaround.hpp>
>
> int main( void )
> {
>
> std::vector<double> vect1(3);
> std::vector<double> vect2(3);
>
> // boost::zip_iterator<
> // boost::tuples::tuple<
> // std::vector<double>::const_iterator,
> // std::vector<double>::const_iterator
> // >
> // >
> // zip_it_begin(
> // boost::make_tuple(
> // vect1.begin(),
> // vect2.begin()
> // )
> // );
>
> std::vector<boost::tuples::tuple<double, double> >
> vect_of_tuples(3);
>
> std::copy(
> boost::make_zip_iterator(
> boost::make_tuple(
> vect1.begin(),
> vect2.begin()
> )
> ),
> boost::make_zip_iterator(
> boost::make_tuple(
> vect1.end(),
> vect2.end()
> )
> ),
> vect_of_tuples.begin()
> );
>
> return 0;
> }
>
> If I uncomment the earlier instantiation of zip_it_begin then it
> compiles without any errors! I'm guessing this is some kind of
compiler
> bug but and am wondering what the correct/most elegant workaround
> is?
Well, I don't know, but if you haven't already done so you might try
the latest Boost CVS instead of 1.32. If the problem disappears that
would be the easiest solution.
> Do I have make sure I manually declare a zip_iterator somewhere
> before using make_zip_iterator?
Can't tell ya. I do note that the one you declared is using constant
iterators while the one you're building with make_zip_iterator is
using mutable iterators.
Sorry I'm not more clue-ful here. This looks like a good question for
Microsoft support ;-)
-- Dave Abrahams Boost Consulting www.boost-consulting.com _______________________________________________ Boost-users mailing list Boost-users_at_[hidden] http://lists.boost.org/mailman/listinfo.cgi/boost-users The information transmitted is intended only for the person(s) or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect those of Brevan Howard Asset Management LLP, its members and affiliates. Brevan Howard Asset Management LLP is authorised and regulated by the Financial Services Authority. Registered Office: 42 Portman Road, Reading, Berkshire RG3O 1EA. Phone number 020 7022 6100.
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