P0863R1.pdf

p0863r1.pdf
Preview of P0863R1
🔗 Source: open-std.org
📊 Size: 306 KB
📄 Pages: 9 pages
⬇️ Downloads: 82

Summary

The C++ committee reviewed the Consistent Comparison proposal and found an issue with the partialorder comparison algorithm, which checks a == b and a < b but not b < a, and always returns a value other than partialorder::unordered when the inputs are unordered. The current design assumes operator< provides at least a weak order, but this has unfortunate consequences. The desirable properties of the fallbacks include providing genuine strong, weak, or partial orders when the underlying type's operators implement the corresponding ordering. However, the current wording supports all properties except for property 3, which concerns partial orders. Modifying partialorder to test b < a and return partialordering::unordered if both return false would fix the issue but come at a cost, as properties 8 and 9 would no longer hold. The author argues that properties 7, 8, and 9 have no value and that the modification should be made to ensure correct results for partial orders. Additionally, the cost of allowing strongorder and weakorder on partially ordered types is considered, and it is suggested that SFINAE tests on these expressions cannot provide useful information about the comparison semantics of the type.

Description

The C++ committee reviewed the Consistent Comparison proposal and found an issue with the partial_order comparison algorithm, which checks a == b and a < b but...

Technical Information

  • File Format: PDF
  • File Size: 306 KB
  • Pages: 9
  • Language: EN
  • Total Downloads: 82
  • Last Updated: 1 month ago

Document Overview

This PDF document about P0863R1 provides comprehensive information and guidance. Whether you're a beginner or advanced user, this resource offers valuable insights into P0863R1.

Related Topics

If you're interested in P0863R1, you might also want to explore:

Download P0863R1 eBooks for free and learn more about P0863R1. These books contain exercises and tutorials to improve your practical skills, at all levels!

Not satisfied with this document? We have related documents to P0863R1, try searching with similar keywords: P0863R1

You can download PDF versions of the user's guide, manuals and ebooks about P0863R1, you can also find and download for free A free online manual (notices) with beginner and intermediate, Downloads Documentation, You can download PDF files (or DOC and PPT) about P0863R1 for free, but please respect copyrighted ebooks.