KhronosGroup / KhronosGroup/SYCL-Docs

Should the marray subscript operator be constexpr?

Open
#367 3 comments 1 reaction 0 assignees View on GitHub
clarification
Dominant language
JavaScript
Stars
158
Forks
80
Avg merge
7d 6h
Merged PRs (30d)
5

Description

The subscript operators on `std::array` is declared [`constexpr` since C++17](https://en.cppreference.com/w/cpp/container/array/operator_at). Should the subscript operator of `sycl::marray` follow suit or is there a reason to no make it `constexpr`?

Depending on the conclusion, this could be extended to `sycl::vec` too.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the sycl::marray subscript operator and comparing it with std::array's constexpr declaration since C++17. Determine whether marray should follow that behavior, and whether the same conclusion applies to sycl::vec; done means documenting or specifying a clear decision.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.