[Stlport-devel] _STLP_DEBUG mode enhancement
Brought to you by:
complement
From: <fra...@fr...> - 2007-09-23 19:11:27
|
Hi I introduce in 5.1 version additional checks in _STLP_DEBUG mode. Those checks purpose was to validate user functor implementation: - for strict weak ordering functors if (functor(a, b)) assert(!functor(b, a); - for equality functors if (functor(a, b) assert(functor(b, a); Those checks are of course adding a new constraint on the functor. It must be commutative, this is an additional constraint only when a and b are of different type. It is also modifying number of functor invocations. I considered those 2 additional constraints as not real ones but rather as simply good coding practice. But Petr thought otherwise and removed almost everything. Almost comes from the fact that there are some algorithms already invoking the functor in both way. I would like to know if everyone agree that this is too much constraint and checks shouldn't be restored. For info MSVC native library is also doing those checks. I found a __glibcxx_check_strict_weak_ordering_pred macro in GNU implementation but haven't found any use of it, looks like dev or debate is in progress. Even if checks have already been removed from 5.1 I won't change anything and will now work on 5.1.4 release. Bests |