Skip to content

Commit

Permalink
Update documentation of swap.
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Jan 26, 2025
1 parent 55bc631 commit 6a9e8c7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions doc/array/reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace boost {
template<typename T, std::size_t N> class array;

template<typename T, std::size_t N>
constexpr void swap(array<T, N>&, array<T, N>&);
void swap(array<T, N>&, array<T, N>&);

template<typename T, std::size_t N>
constexpr bool operator==(const array<T, N>&, const array<T, N>&);
Expand Down Expand Up @@ -120,7 +120,7 @@ public:

// modifiers

constexpr void swap(array<T, N>&);
swap(array<T, N>&);

constexpr void fill(const T&);
void assign(const T&); // deprecated
Expand Down Expand Up @@ -290,10 +290,10 @@ Remarks: :: This function is deprecated. Use `data()` instead.
### Modifiers

```
constexpr void swap(array<T, N>& other);
void swap(array<T, N>& other);
```
[horizontal]
Effects: :: for each `i` in `[0..N)`, calls `swap(elems[i], other.elems[i])`.
Effects: :: `std::swap(elems, other.elems)`.
Complexity: :: linear in `N`.

---
Expand All @@ -319,7 +319,7 @@ Remarks: :: An obsolete and deprecated spelling of `fill`. Use `fill` instead.

```
template<typename T, std::size_t N>
constexpr void swap(array<T, N>& x, array<T, N>& y);
void swap(array<T, N>& x, array<T, N>& y);
```
[horizontal]
Effects: :: `x.swap(y)`.
Expand Down

0 comments on commit 6a9e8c7

Please sign in to comment.