Use `boost::core::invoke_swap` with a `const T&`

Open
#155 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
tooling

Research direction

Start with include/boost/core/invoke_swap.hpp around line 81 and compare its const-qualified participation rules with the C++23 std::ranges::zip_view proposal and its const std::pair and std::tuple swap overloads. Determine whether invoke_swap should support const T& and identify the existing tests covering overload resolution. Done means the intended behavior is agreed and covered by focused tests.

Written by the indexing model from the issue text.

Description

Hi, this is rather an inquiry than an actual issue.
boost::core::invoke_swap only participates in overload resolution, when the type it gets called with is not const qualified (invoke_swap.hpp#L81). C++23 standardized std::ranges::zip_view. As part of the proposal, std::pair and std::tuple got const-qualified overloads of their swap-functions (the rationale can be found here). Should this change be somehow reflected in boost::core::invoke_swap?

Dominant language
C++
Stars
156
Forks
116
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/core

All issues in boostorg/core

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.