[libcxx-commits] [PATCH] D129390: [lib++][ranges][NFC] Refactor `iterator_operations.h` to use tags.

Konstantin Varlamov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 12 10:31:33 PDT 2022


var-const added inline comments.


================
Comment at: libcxx/include/__algorithm/iterator_operations.h:39
   static constexpr auto distance = ranges::distance;
+  static constexpr auto __iter_move = ranges::iter_move;
+  static constexpr auto iter_swap = ranges::iter_swap;
----------------
philnik wrote:
> huixie90 wrote:
> > question. why double underscores here?
> `iter_move` is only used by the standard since C++20, so we can't use it in earlier versions.
Theoretically, a user could define a macro "overriding" the name unless it's a name reserved for the implementation (which `iter_move` isn't until C++20 like Nikolas mentioned).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129390/new/

https://reviews.llvm.org/D129390



More information about the libcxx-commits mailing list