[libcxx-commits] [PATCH] D129099: [libcxx][ranges] Create a test tool `ProxyIterator` that customises `iter_move` and `iter_swap`

Konstantin Varlamov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jul 6 15:01:07 PDT 2022


var-const accepted this revision as: var-const.
var-const added inline comments.


================
Comment at: libcxx/test/support/test_iterators.h:802
+// but simplified to just hold one argument.
+// Note that unlike tuple this class doesn't have special handling of swap
+template <class T>
----------------
var-const wrote:
> Can you expand the comment to explain the intention here?
Thanks! The class doesn't have special handling of `swap` to make sure there's a compilation error if the underlying algorithm uses plain `swap`, right? If yes, can you also add that to the comment -- perhaps something like "Note that unlike `tuple`, this class deliberately doesn't have special handling of `swap` to cause a compilation error if it's used in an algorithm that relies on plain `swap` instead of `ranges::iter_swap`".


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129099



More information about the libcxx-commits mailing list