The C++20 spaceship operator provides a three-way comparison, the result of which is then wrapped in an ordering type. The standard provides three ordering types because different types can only support some orderings. std::strong_ordering for which equality implies that the values are indistinguishable (i.e. if a == b, then f(a) == f(b)). std::weak_ordering allows equal, distinguishable values but doesn't permit uncomparable values. std::partial_ordering which allows uncomparable values (i.e. a < b, a > b and a == b all return false). Compiler Explorer link: https://lnkd.in/ej2U2QCv #cpp #cplusplus #coding #programming #dailybiteofcpp
Šimon Tóth’s Post
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development
The amount of C++ you read, write & share is just wild!