Opened 11 years ago

#5961 new Bugs

ptr_container supports comparison of iterators of different types

Reported by: Rob Desbois <rob.desbois@…> Owned by: Thorsten Ottosen
Milestone: To Be Determined Component: ptr_container
Version: Boost 1.47.0 Severity: Problem
Keywords: iterator, type Cc:

Description

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: == != < <= > >=

Change History (0)

Note: See TracTickets for help on using tickets.