rurban / ctl

My variant of the C Template Library

Home Page:https://rurban.github.io/ctl/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

document set.find problem with 2-way compare

rurban opened this issue · comments

automatically fixed for simple integral types, like int, as we call now _set_default_methods for all containers.

but for set we don't want to call two compare methods. we rather call compare once, and if that's 0, call optionallty the equal method. the STL rather calls compare twice.

found via formal verification: https://github.com/rurban/ctl/blob/master/tests/verify/set-find.cbmc-fail

Fixed with c498e23