|
Boost : |
From: Yitzhak Sapir (yitzhak.sapir_at_[hidden])
Date: 2004-08-17 09:01:12
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, but the problem is in the instantiation of boost::is_same<T1 or T2,int>). If I remove the ETI "workarounds" the code compiles fine. So my question is what is ETI, what does the ETI workaround provide, and how can I benefit from both the workaround and normal use of the code?
The code looks something like:
std::find(boost::make_zip_iterator(boost::make_tuple(vector1.begin(), vector2.begin())), boost::make_zip_iterator(boost::make_tuple(vector1.end(), vector2.end())), ...
The beginning of the error looks something like this:
./../3rdParty\boost/iterator/detail/minimum_category.hpp(86) : error C2057: expected constant expression
../../3rdParty\boost/iterator/detail/minimum_category.hpp(112) : see reference to class template instantiation 'boost::detail::minimum_category<struct boost::random_access_traversal_tag,struct boost::random_access_traversal_tag>' being compi
led
../../3rdParty\boost/mpl/aux_/preprocessed/msvc60/apply.hpp(88) : see reference to class template instantiation 'boost::detail::minimum_category<struct boost::mpl::arg<1>,struct boost::mpl::arg<2> >::apply<struct boost::random_access_travers
al_tag,struct boost::random_access_traversal_tag>' being compiled
../../3rdParty\boost/mpl/aux_/preprocessed/msvc60/apply.hpp(101) : see reference to class template instantiation 'boost::mpl::aux::msvc_apply2<struct boost::detail::minimum_category<struct boost::mpl::arg<1>,struct boost::mpl::arg<2> > >::re
sult_<struct boost::random_access_traversal_tag,struct boost::random_access_traversal_tag>' being compiled
../../3rdParty\boost/iterator/zip_iterator.hpp(173) : see reference to class template instantiation 'boost::mpl::apply2<struct boost::detail::minimum_category<struct boost::mpl::arg<1>,struct boost::mpl::arg<2> >,struct boost::random_access_
traversal_tag,struct boost::random_access_traversal_tag>' being compiled
Thanks.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk