mirror of
https://github.com/boostorg/array.git
synced 2025-07-29 12:17:40 +02:00
Update documentation
This commit is contained in:
@ -35,6 +35,9 @@ namespace boost {
|
||||
template<typename T, std::size_t N>
|
||||
constexpr bool operator>=(const array<T, N>&, const array<T, N>&);
|
||||
|
||||
template<typename T, std::size_t N>
|
||||
constexpr auto operator<=>(const array<T, N>&, const array<T, N>&);
|
||||
|
||||
template<std::size_t Idx, typename T, std::size_t N>
|
||||
constexpr T& get(array<T, N>&) noexcept;
|
||||
template<std::size_t Idx, typename T, std::size_t N>
|
||||
@ -136,7 +139,7 @@ public:
|
||||
template<typename U> array& operator=(const array<U, N>& other);
|
||||
```
|
||||
[horizontal]
|
||||
Effects: :: `std::copy(rhs.begin(), rhs.end(), begin())`.
|
||||
Effects: :: For each `i` in `[0..N)`, performs `elems[i] = other.elems[i];`.
|
||||
|
||||
---
|
||||
|
||||
@ -233,7 +236,7 @@ constexpr const_reference operator[](size_type i) const;
|
||||
[horizontal]
|
||||
Requires: :: `i < N`.
|
||||
Returns: :: `elems[i]`.
|
||||
Throws: :: nothing.
|
||||
Throws: :: Nothing.
|
||||
|
||||
---
|
||||
|
||||
@ -254,7 +257,7 @@ constexpr const_reference front() const;
|
||||
[horizontal]
|
||||
Requires: :: `N > 0`.
|
||||
Returns: :: `elems[0]`.
|
||||
Throws: :: nothing.
|
||||
Throws: :: Nothing.
|
||||
|
||||
---
|
||||
|
||||
@ -265,7 +268,7 @@ constexpr const_reference back() const;
|
||||
[horizontal]
|
||||
Requires: :: `N > 0`.
|
||||
Returns: :: `elems[N-1]`.
|
||||
Throws: :: nothing.
|
||||
Throws: :: Nothing.
|
||||
|
||||
---
|
||||
|
||||
@ -302,7 +305,7 @@ Complexity: :: linear in `N`.
|
||||
void fill(const T& value);
|
||||
```
|
||||
[horizontal]
|
||||
Effects: :: for each `i` in `[0..N)`, performs `elems[i] = value;`.
|
||||
Effects: :: For each `i` in `[0..N)`, performs `elems[i] = value;`.
|
||||
|
||||
---
|
||||
|
||||
@ -382,6 +385,17 @@ Returns: :: `!(x < y)`.
|
||||
|
||||
---
|
||||
|
||||
```
|
||||
template<typename T, std::size_t N>
|
||||
constexpr auto operator<=>(const array<T, N>& x, const array<T, N>& y)
|
||||
-> decltype(x[0] <=> y[0]);
|
||||
```
|
||||
[horizontal]
|
||||
Effects: :: For each `i` in `[0..N)`, if `(x[i] \<\=> y[i]) != 0`, returns `x[i] \<\=> y[i]`. Otherwise, returns `std::strong_ordering::equal`, converted to the return type.
|
||||
Remarks: :: When `N` is 0, the return type is `std::strong_ordering` and the return value is `std::strong_ordering::equal`.
|
||||
|
||||
---
|
||||
|
||||
### Specializations
|
||||
|
||||
```
|
||||
|
Reference in New Issue
Block a user