[feature-request] CTAD for `mdspan` from `mdarray`
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 507
- Forks
- 87
- Avg merge
- 15h 27m
- Merged PRs (30d)
- 2
Description
it would be groovy if i could create an mdspan from an mdarray like mdspan{array}. something like this might work:
//! \brief Deduction guide for \c ::std::mdspan that makes its template parameters
//! deducable from a \c ::std::experimental::mdarray.
template <class ElementType, class Extents, class LayoutPolicy, class Container>
mdspan(experimental::mdarray<ElementType, Extents, LayoutPolicy, Container>&)
-> mdspan<ElementType, Extents, LayoutPolicy>;
//! \overload
template <class ElementType, class Extents, class LayoutPolicy, class Container>
mdspan(const experimental::mdarray<ElementType, Extents, LayoutPolicy, Container>&)
-> mdspan<const ElementType, Extents, LayoutPolicy>;
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the mdspan deduction guides and the mdarray definition in the repository. Check how mutable and const mdarray objects should deduce their mdspan element types, then add coverage for both forms and confirm the proposed mdspan{array} syntax compiles.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100