Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#10808 closed Bugs (fixed)

compare equal operator of vector is broken

Reported by: Dirk Reinbach <dirk.reinbach@…> Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: container
Version: Boost 1.57.0 Severity: Problem
Keywords: container vector compare equal operator Cc:

Description

Please find attached patch for details. I think this patch is self-explanatory, so i pass on an example program.

Attachments (1)

container.vector.patch (536 bytes ) - added by Dirk Reinbach <dirk.reinbach@…> 8 years ago.

Download all attachments as: .zip

Change History (5)

by Dirk Reinbach <dirk.reinbach@…>, 8 years ago

Attachment: container.vector.patch added

comment:1 by Ion Gaztañaga, 8 years ago

Resolution: fixed
Status: newclosed

Thanks for the report. It was recently fixed in develop:

SHA-1: e6d19fb408237696b65e871ec78d3220c908dcef

  • Fixed in bug in vector::operator==

https://github.com/boostorg/container/commit/e6d19fb408237696b65e871ec78d3220c908dcef

comment:2 by Dirk Reinbach <dirk.reinbach@…>, 8 years ago

Thanx. I was in a hurry and missed a look at the developer version (I was too clumsy for the web interface and I have no git on my machine).

However, according to your patch you are now using operator!= in your implementation. Actually this is the only reason I stumbled upon this bug due to operator ambiguities. If you want to get rid of dependencies to equal() you should at least copy their implementation IMHO (!(*a==*b)).

comment:3 by Dirk Reinbach <dirk.reinbach@…>, 8 years ago

In the meantime you switched to algo_equal() from intrusive module. Thank you very much :-D

comment:4 by Ion Gaztañaga, 8 years ago

Sorry, I forgot to document the change in this bug. Thanks for your comment.

Note: See TracTickets for help on using tickets.