
AMDG On 04/26/2013 09:22 AM, Adam Wulkiewicz wrote:
I'm trying to use type-erased iterator in STL algorithms, e.g. copy but get errors like this one:
error C2039: 'iterator_category' : is not a member of 'boost::type_erasure::any<Concept>' c:\program files (x86)\microsoft visual studio 10.0\vc\include\xutility 373
of course any doesn't define iterator_category. I'm using MSVC2010 and doing something like this:
typedef boost::type_erasure::any< boost::type_erasure::iterator< boost::single_pass_traversal_tag >
iterator;
<snip>
I simply tried to add it to the iterator<> Concept defined in iterator.hpp but this didn't help:
template<...> struct iterator< ::boost::single_pass_traversal_tag, ...> : iterator< ::boost::incrementable_traversal_tag, ...> { <snip> typedef std::input_iterator_tag iterator_category; };
Am I doing something wrong or is it an error in Boost.TypeErasure?
The code currently supports only forward_traversal_tag, bidirectional_traversal_tag, and random_access_traversal_tag. What needs to be added is another concept_interface specialization. In Christ, Steven Watanabe