RE: [boost] Re: ETI bug and iterators

-----Original Message----- From: David Abrahams [mailto:dave@boost-consulting.com]
"Yitzhak Sapir" <yitzhak.sapir@actimize.com> writes:
-----Original Message----- From: David Abrahams
"Yitzhak Sapir" <yitzhak.sapir@actimize.com> 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.

"Yitzhak Sapir" <yitzhak.sapir@actimize.com> writes:
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:
Not for me. Of course I had to remove the include of stdafx.h since I don't have that, but the first error is: c:\boost\boost/tuple/detail/tuple_basic_no_partial_spec.hpp(170) : error C2079: 'head' uses undefined class 'please_invoke_BOOST_TT_BROKEN_COMPILER_SPEC_on_cv_unqualified_pointee<class c1 *>' and when I follow the directions and add BOOST_TT_BROKEN_COMPILER_SPEC(c1); BOOST_TT_BROKEN_COMPILER_SPEC(c2); after the definitions of c1 and c2, everything compiles. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com
participants (2)
-
David Abrahams
-
Yitzhak Sapir