Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Address test failures for C++20 changing traits results (#5164)
When C++20 added support for initializing aggregates with parentheses as well as with braces, there was an unexpected interaction with various type traits where the formula for determining a trait to be false would now return true if the result of the implicit array to pointer decay could be stored as the first element of the array that is the type under test. A workaround for this scenario is already present in the test driver, but the preprocessor logic to enable that expected change of test resutls is overly specific, and does not use the correct feature test macro from the C++ Standard. Note that this proposed solution is to retain the old behavior of the bsl trait, contradicting the value of the standard trait and so raising no surprises for our existing consumers. However, as the C++ Standard has not addressed this issue for C++23 and is not likely to be addressed by C++26, we might want to consider adopting the complete Standard contract rather than maintaining our own more sensible result, as the standard semantics will become expected, and so less surprising for the informed audience. For now though, this patch hacks the expected result of the test driver rather than making bsl conform to a bogus std contract.
- Loading branch information