std::mdspan<T,Extents,LayoutPolicy,AccessorPolicy>:: operator[]
|
template
<
class
...
OtherIndexTypes
>
constexpr reference operator [ ] ( OtherIndexTypes... indices ) const ; |
(1) | (C++23 이후) |
|
template
<
class
OtherIndexType
>
constexpr
reference operator
[
]
|
(2) | (C++23 이후) |
|
template
<
class
OtherIndexType
>
constexpr
reference operator
[
]
|
(3) | (C++23 이후) |
mdspan의 indices 번째 요소에 대한 참조를 반환합니다.
acc_
.
access
(
ptr_
,
map_
(
static_cast
<
index_type
>
(
std
::
move
(
indices
)
)
...
)
)
;
.
- ( std:: is_convertible_v < OtherIndexTypes, index_type > && ... )
- ( std:: is_nothrow_constructible_v < index_type, OtherIndexTypes > && ... )
- sizeof... ( OtherIndexTypes ) == rank ( )
|
extents_type
::
|
(C++26까지) |
|
extents_type
::
|
(C++26부터) |
P
를 다음 조건을 만족하는 매개변수 팩이라고 하자:
std::
is_same_v
<
std::
make_index_sequence
<
rank
(
)
>
,
std:: index_sequence < P... >> 가 true 인 경우, 다음 코드와 동등하다: return operator [ ] ( extents_type ::
index-cast
(
std::
as_const
(
indices
[
P
]
)
)
...
)
;
.
- std:: is_convertible_v < const OtherIndexType & , index_type >
- std:: is_nothrow_constructible_v < index_type, const OtherIndexType & >
목차 |
매개변수
| indices | - | 접근할 요소의 인덱스들 |
반환값
요소에 대한 참조입니다.
예제
|
이 섹션은 불완전합니다
이유: 예제 없음 |
결함 보고서
다음의 동작 변경 결함 보고서들은 이전에 발표된 C++ 표준에 소급 적용되었습니다.
| DR | 적용 대상 | 게시된 동작 | 올바른 동작 |
|---|---|---|---|
| LWG 3974 | C++23 |
오버로드
(2,3)
이
extents_type::
index-cast
를 적용하지 않음
|
적용함 |
참고 항목
| 이 섹션은 불완전합니다 |