[libcxx][NFC] removes `swap`'s dependency on `swap_ranges`
Under the as-if rule, we can directly implement the array overload for `std::swap`. By removing this circular dependency where `swap` is implemented in terms of `swap_ranges` and `swap_ranges` is defined in terms of `swap`, we can split them into their own headers. This will: * limit the surface area in which Hyrum's law can bite us; * force users to include the correct headers; * make finding the definitions trivial (`swap` is a utility; `swap_ranges` is an algorithm). Differential Revision: https://reviews.llvm.org/D104760
Loading
Please sign in to comment