Opened 8 years ago
Closed 7 years ago
#10672 closed Bugs (fixed)
std::iterator_traits<boost::unordered_map<K,M>::iterator>::pointer should be value_type*, not detail::ptr_node<...>
| Reported by: | anonymous | Owned by: | Daniel James | 
|---|---|---|---|
| Milestone: | To Be Determined | Component: | unordered | 
| Version: | Boost 1.54.0 | Severity: | Problem | 
| Keywords: | Cc: | 
Description (last modified by )
The iterator type looks like:
template <typename NodePointer, typename Value>
struct iterator
    : public boost::iterator<
        std::forward_iterator_tag, Value, std::ptrdiff_t,
        NodePointer, Value&>
The NodePointer argument here (which is boost::unordered::detail::ptr_node<...>) becomes the iterator_traits<>::pointer type.
But iterator's operator->() returns Value *:
Value* operator->() const {
    return &node_->value();
}
Seems like this should be changed.
Change History (4)
comment:1 by , 8 years ago
| Description: | modified (diff) | 
|---|---|
| Status: | new → assigned | 
comment:2 by , 8 years ago
comment:4 by , 7 years ago
| Resolution: | → fixed | 
|---|---|
| Status: | assigned → closed | 
  Note:
 See   TracTickets
 for help on using tickets.
    

Fix in develop: https://github.com/boostorg/unordered/commit/99985bb1b26ea13e9a85f723cfa9369a4c9ee257
Will hopefully be included in the next release.