#445 closed request (fixed)
All iterators with value type `DataWeight` should be weighted
Reported by: | Peter | Owned by: | Peter |
---|---|---|---|
Priority: | major | Milestone: | yat 0.5 |
Component: | utility | Version: | trunk |
Keywords: | Cc: |
Description
Is it possible to implement such a rule?
There is a class weighted_iterator_traits
that is taking care of this kind of thing, but that is templatized on Iterator. For example, there is specialization for std::vector<DataWeight>::iterator
template<> struct weighted_iterator_traits<std::vector<DataWeight>::iterator> { typedef weighted_iterator_tag type; }
It would be useful if could generalize that specialization for all iterators that have value_type
DataWeight. Not sure how to do such a thing, though.
related to ticket:395
Change History (3)
comment:1 Changed 15 years ago by
Milestone: | yat 0.x+ → yat 0.5 |
---|---|
Status: | new → assigned |
comment:2 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 Changed 15 years ago by
Note: See
TracTickets for help on using
tickets.
(In [1541]) fixes #445 so iterator_traits detects when value_type is DataWeight? and return weighted_iterator_tag. Also weighted_iterator_traits recognize some normal cases; when reference_type is DataWeight?& or const DataWeight?& weighted behaviour is performed.
Fixed some incorrect inclusion in WeightedIterator? and removed debug code in StrideIterator?.