ORNL / ORNL/cpp-proposals-pub

`decay()` on AccessorPolicy should just be spelled std::to_address()

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

Nobody has claimed this yet.

subject - mdspan (P0009)
Dominant language
HTML
Stars
29
Forks
26
PR merge metrics
No merged PRs in 30d

Description

The cases where decay() behavior should differ from std::to_address() (which basically delegates to std::pointer_traits<T>::to_address(), with some specific exceptions) are really esoteric and definitely don't necessitate the extra complexity in Accessor. (If you really needed different behavior for some reason I can't even conceive of, you could always wrap the pointer type and provide a std::pointer_traits specialization for the wrapped type, but I really can't think of a scenario when someone would need to do this.)

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.

Research direction

Start by locating AccessorPolicy and its decay() entry point, then compare its behavior with std::to_address() and the stated pointer_traits exceptions. Done means the extra decay behavior is removed or aligned as proposed, with the affected behavior verified by the repository's existing checks.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.