The std::iter_swap is a convenient shorthand for indirectly swapping values, i.e. swapping the values pointed to by two iterators. While the original version std::iter_swap is only intended for iterators, the range C++20 version std::ranges::iter_swap can work with any indirectly movable type and supports customization through ADL. Compiler Explorer link: https://lnkd.in/eNJxW6RB #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
m374-crypt0•880 followers
1yThanks for this daily example ! I'm curious, at en.cppreference.com, the sentinel_for concept has 2 template parameters, am I missing something ?