From 6a9e8c78da12d232fa8233b5000dc337553036f0 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 26 Jan 2025 04:11:14 +0200 Subject: [PATCH] Update documentation of `swap`. --- doc/array/reference.adoc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/array/reference.adoc b/doc/array/reference.adoc index 5e80a0e..e2265de 100644 --- a/doc/array/reference.adoc +++ b/doc/array/reference.adoc @@ -19,7 +19,7 @@ namespace boost { template class array; template - constexpr void swap(array&, array&); + void swap(array&, array&); template constexpr bool operator==(const array&, const array&); @@ -120,7 +120,7 @@ public: // modifiers - constexpr void swap(array&); + swap(array&); constexpr void fill(const T&); void assign(const T&); // deprecated @@ -290,10 +290,10 @@ Remarks: :: This function is deprecated. Use `data()` instead. ### Modifiers ``` -constexpr void swap(array& other); +void swap(array& 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`. --- @@ -319,7 +319,7 @@ Remarks: :: An obsolete and deprecated spelling of `fill`. Use `fill` instead. ``` template - constexpr void swap(array& x, array& y); + void swap(array& x, array& y); ``` [horizontal] Effects: :: `x.swap(y)`.