provide multi_array::swap

Open
#33 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
data

Research direction

Start by examining multi_array's current resize method and the private data members mentioned in the issue. Compare the requested swap operation with issue #24 and determine whether the intended result is a public swap or protected access; done means a subclass can resize during assignment without type-punning.

Written by the indexing model from the issue text.

Description

... or at least make its members protected to allow a subclass to do so.

swap would be substantially the same as the current resize method.

Background: I use a subclass of multi_array in order to resize during assignment to get around the most dagnerous multi_array pitfall. This works, but I'd also like to fix another longstanding inefficiency ( #24 ) while I'm at it. Unfortunately the private data members make it impossible to fix in my subclass (barring a type-punning hack).

Dominant language
C++
Stars
32
Forks
39
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/multi_array

All issues in boostorg/multi_array

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.