[libc++] [ranges] Add namespace __cpo to ranges::{advance,next,prev}.
The reason for those nested namespaces is explained in D115315: > AIUI, this keeps the CPO's own type from ADL'ing into the `std::ranges` > namespace; e.g. `foobar(std::ranges::uninitialized_default_construct)` > should not consider `std::ranges::foobar` a candidate, even if > `std::ranges::foobar` is not a CPO itself. Also, of course, consistency > (Chesterton's Fence, the economist's hundred-dollar bill): if it were > safe to omit the namespace, we'd certainly want to do it everywhere, > not just here. This makes these three niebloids more consistent with the other Ranges niebloids we've already implemented, such as the `ranges::begin` group and the `ranges::uninitialized_default_construct` group. FWIW, we still have three different indentation-and-comment styles among these three groups. Differential Revision: https://reviews.llvm.org/D116569
Loading
Please sign in to comment