Support decomposing types that only compare with literal 0

This is primarily done to support new `std::*_ordering` types,
but the refactoring also supports any other type with this
property.

The compilation overhead is surprisingly low. Testing it with
clang on a Linux machine, compiling our SelfTest project takes
only 2-3% longer with these changes than it takes otherwise.

Closes #2555
This commit is contained in:
Martin Hořeňovský
2022-11-01 15:01:43 +01:00
parent d7f8c36e4c
commit ec59cd8736
6 changed files with 191 additions and 74 deletions

View File

@@ -133,6 +133,7 @@ set(TEST_SOURCES
set(TEST_HEADERS
${SELF_TEST_DIR}/helpers/parse_test_spec.hpp
${SELF_TEST_DIR}/helpers/type_with_lit_0_comparisons.hpp
)