ORNL / ORNL/cpp-proposals-pub

P1684R5: Conversions and `to_mdspan` should provide untemplated overloads

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

Nobody has claimed this yet.

Dominant language
HTML
Stars
29
Forks
26
PR merge metrics
No merged PRs in 30d

Description

Currently the conversion to mdspan and the to_mdspan are templated with different template arguments

  template<class OtherElementType, class OtherExtents,
                   class OtherLayoutType, class OtherAccessorType>
  operator mdspan ();

  template<class OtherAccessorType>
    constexpr mdspan<element_type, extents_type, layout_type, OtherAccessorType>
      to_mdspan(const OtherAccessorType& a = default_accessor<element_type>());

That prevents us from using CTAD for the common use case where one converts to a matching mdspan. We should provide untemplated overloads so that this works

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

No files, tests, or entry points are named in the issue. Start by reading the existing conversion and to_mdspan signatures shown in the report and the surrounding proposal context. Done means providing untemplated overloads that support CTAD for the common matching-mdspan conversion case.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.