Subject: [Boost-bugs] [Boost C++ Libraries] #5961: ptr_container supports comparison of iterators of different types
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-09-29 10:11:47
#5961: ptr_container supports comparison of iterators of different types
-------------------------------------------------+--------------------------
Reporter: Rob Desbois <rob.desbois@â¦> | Owner: nesotto
Type: Bugs | Status: new
Milestone: To Be Determined | Component: ptr_container
Version: Boost 1.47.0 | Severity: Problem
Keywords: iterator, type |
-------------------------------------------------+--------------------------
The void_ptr_iterator, which handles much of the ptr_container iterator
functionality, oddly supports comparison operations between iterators of
differing types.
For example:
{{{
ptr_vector<int> vi;
ptr_vector<string> vs;
bool eq = (vi.begin() == vs.begin());
}}}
The affected operators are: == != < <= > >=
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5961> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:07 UTC