Skip to content
Commit d87f159a authored by Christopher Di Bella's avatar Christopher Di Bella
Browse files

[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
parent 652f4b51
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment