This is an archive of the discontinued LLVM Phabricator instance.

[test] [libcxx] Disable MSVC++'s compare(a, b) implies !compare(b, a) assertion in predicate application count tests
AbandonedPublic

Authored by BillyONeal on May 30 2017, 7:54 PM.

Details

Summary

Turn off MSVC++'s comp(a, b) implies !comp(b, a) assertion in tests that are checking for predicate counts.

There should be no functionality change for libcxx as it does not look for the _ITERATOR_DEBUG_LEVEL macro.

While this assert is technically out of contract because the standard specifies exact operation counts for these algorithms, in practice users using !less t
o implement greater is a fairly common mistake, and this assert turns out to be highly compatible. Note also that in the inplace_merge case, users can't even rely on exact application counts here, so the complexity bound is probably overspecified in the standard.

Diff Detail

Event Timeline

BillyONeal created this revision.May 30 2017, 7:54 PM
BillyONeal abandoned this revision.May 30 2017, 8:19 PM

Stephan pointed out that the force include breaks this. Backing it out for now :(