Boost logo

Boost :

From: Yitzhak Sapir (yitzhak.sapir_at_[hidden])
Date: 2004-08-18 03:52:04


> -----Original Message-----
> From: David Abrahams [mailto:dave_at_[hidden]]
>
> "Yitzhak Sapir" <yitzhak.sapir_at_[hidden]> writes:
>
> >> -----Original Message-----
> >> From: David Abrahams
> >>
> >> "Yitzhak Sapir" <yitzhak.sapir_at_[hidden]> writes:
> >>
> >> > Hello.
> >> >
> >> > I am in the process of upgrading code to use boost 1.31.0
> >> for MSVC6.5.
> >> > During this process I happened upon minimum_category.hpp which
> >> > contains "ETI workarounds". Now, it seems that the ETI
> workarounds
> >> > cause the compilation to fail, with the error message: constant
> >> > expression expected. Particularly, we are creating zip
> iterators to
> >> > two STLPort vectors. In debug iterator mode, I get the following
> >> > error. (minimum_category.hpp was modified a bit
> >>
> >> Post the error you get with an unmodified minimum_category.hpp,
> >> please. It's hard to analyze when the line numbers are wrong.
> >>
> >
> > ../../3rdParty\boost/iterator/detail/minimum_category.hpp(86) :
> > error C2039: 'apply' : is not a member of
> > '?$minimum_category_impl@$$00'
>
> Does the enclosed patch fix it?
>

No. I get the following:

../../3rdParty\boost/iterator/detail/facade_iterator_category.hpp(146) : error C2516: 'Traversal' : is not a legal base class
        ../../3rdParty\boost/iterator/detail/facade_iterator_category.hpp(145) : see declaration of 'Traversal'
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\stlport\stl/_algobase.c(196) : see reference to class template instantiation 'boost::detail::iterator_category_with_traversal<struct _STL::output_iterator_tag,int>' being compiled

I can't send my own code, but the following code causes the previously described error with an unpatched minimum_category.hpp and an ICE when compiled with patched and unpatched minimum_category.hpp:

#include "stdafx.h"
#include <boost/iterator/zip_iterator.hpp>
#include <boost/tuple/tuple.hpp>
#include <vector>
#include <algorithm>

class c1 {};
class c2 {};

typedef std::vector<c1> c1_vec_t;
typedef std::vector<c2> c2_vec_t;

using namespace boost;

void f(const tuples::tuple<c1, c2>& param)
{
}

int main(int argc, char* argv[])
{
        c1_vec_t vec1;
        c2_vec_t vec2;

        make_zip_iterator(make_tuple(vec1.begin(), vec2.begin()));

        return 0;
}

If the ETI workarounds in minimum_category.hpp are removed the above code compiles fine.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk