
Hartmut Kaiser wrote:
Reece Dunn wrote:
I reported that VC7 uses the correct implementation of reverse_iterator, and that this can be detected via BOOST_NO_STD_ITERATOR. Although this compiles, you cannot use reverse iterators.
The problem is that the iterator is of the form (const) T *, and this fails because there is not a correct implementation of iterator_traits (due to a lack of partial template specialization) that *is* detected by BOOST_NO_STD_ITERATOR_TRAITS.
The solution would therefore be to - in this case - provide an iterator wrapper around a standard pointer so it has the correct Iter::value_type, etc definitions. Is there an iterator_adaptor that provides this within boost? If not, should there be one? I am looking into this and will commit the solution to my iterator_adaptor-style implementation (sandbox/boost/fixed_string/detail/basic_string_impl.hpp).
NOTE: If you want to add any of my modifications to the Wave flex_string implementation, feel free, but be warned that I haven't run full tests on it yet and thus there might be bugs in it (especially the pod_xxx --> traits_type::xxx, since these functions have different parameters).
Thanks again for pointing that out. I'll have a look at it next week, when I'm back home. Is this problem specific for VC7 or does it occur on the VC7.1 platform also? If it's specific, then I would some need from somebody to fix this, because I don't have it handy to reproduce the problem. Could you provide a fix for Wave then?
It is just a VC 7 problem, because VC 7 does not have partial template specialization. I have a fix now for this: replace std::reverse_iterator< Iterator > with boost::reverse_iterator< Iterator > (I do not have a proper diff): +# include <boost/iterator/reverse_iterator.hpp> // ... - typedef std::reverse_iterator<iterator -#ifdef BOOST_NO_STD_ITERATOR_TRAITS - , value_type -#endif - > reverse_iterator; + typedef boost::reverse_iterator< iterator > reverse_iterator; - typedef std::reverse_iterator<const_iterator -#ifdef BOOST_NO_STD_ITERATOR_TRAITS - , const value_type -#endif - > const_reverse_iterator; + typedef boost::reverse_iterator< const_iterator > const_reverse_iterator; I have this in my implementation if you want to take a look, along with several other changes to the flex_string implementation. Regards, Reece _________________________________________________________________ Get a FREE connection, FREE modem and one month's FREE line rental, plus a US or European flight when you sign up for BT Broadband! http://www.msn.co.uk/specials/btbroadband