dextents not available in std::experimental namespace
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 507
- Forks
- 87
- Avg merge
- 15h 27m
- Merged PRs (30d)
- 2
Description
dextents is not available in the std::experimental namespace (by default), even though mdspan and other mdspan components are. Instead, dextents can only be found in the std namespace by default.
// does NOT compile
//template <typename T, size_t dimensions = 1>
//using slice0 = stdex::mdspan<T, stdex::dextents<size_t, dimensions>, std::experimental::layout_stride>;
// compiles
template <typename T, size_t dimensions = 1>
using slice1 = stdex::mdspan<T, std::dextents<size_t, dimensions>, std::experimental::layout_stride>;
// compiles
template <typename T, size_t dimensions = 1>
using slice2 = std::mdspan<T, std::dextents<size_t, dimensions>, std::layout_stride>;
One of my colleagues verified today that the problem exists in the headers, not just in the generated godbolt single header. The following code in the example
namespace MDSPAN_IMPL_STANDARD_NAMESPACE {
inline constexpr int foobar = 42;
}
suggests what I think is the problem, namely that extents.hpp doesn't appear to import extents into the std namespace.
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 inspecting extents.hpp and the namespace definitions involved in the provided reproducer. Compile the example with the project headers, then verify that dextents is available through std::experimental alongside the other mdspan components.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100