Files
cppdraft_translate/cppdraft/simd/subscr.md
2025-10-25 03:02:53 +03:00

45 lines
1.3 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[simd.subscr]
# 29 Numerics library [[numerics]](./#numerics)
## 29.10 Data-parallel types [[simd]](simd#subscr)
### 29.10.7 Class template basic_vec [[simd.class]](simd.class#simd.subscr)
#### 29.10.7.3 basic_vec subscript operator [simd.subscr]
[🔗](#lib:operator%5b%5d,basic_vec)
`constexpr value_type operator[](simd-size-type i) const;
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L17903)
*Preconditions*: i >= 0 && i < size() is true[.](#1.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L17907)
*Returns*: The value of the ith element[.](#2.sentence-1)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L17911)
*Throws*: Nothing[.](#3.sentence-1)
[🔗](#lib:operator%5b%5d,basic_vec_)
`template<[simd-integral](simd.expos#concept:simd-integral "29.10.2Exposition-only types, variables, and concepts[simd.expos]") I>
constexpr resize_t<I::size(), basic_vec> operator[](const I& indices) const;
`
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L17923)
*Effects*: Equivalent to: return permute(*this, indices);