[libcxx-commits] [PATCH] D97162: [libcxx] adds std::ranges::swap, std::swappable, and std::swappable_with
Christopher Di Bella via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 4 17:14:56 PST 2021
cjdb marked 2 inline comments as done.
cjdb added a comment.
Will commit tomorrow.
================
Comment at: libcxx/include/concepts:309
+ };
+}
+
----------------
ldionne wrote:
> `// end namespace ranges::__swap`
Also for the namespace below.
================
Comment at: libcxx/test/std/concepts/lang/swappable_with.compile.pass.cpp:564
+
+// struct swappable_with_cv_s2 {
+// swappable_with_cv_s2(swappable_with_cv_s2 const volatile&);
----------------
EricWF wrote:
> Why are these commented out?
Uncommented.
================
Comment at: libcxx/test/std/concepts/lang/swappable_with.compile.pass.cpp:593
+
+#ifndef _LIBCPP_HAS_NO_THREADS
+static_assert(!check_swappable_with<std::lock_guard<std::mutex>,
----------------
ldionne wrote:
> EricWF wrote:
> > Can we write these tests in a way that makes them non-threading dependent.
> >
> I don't think so since he's explicitly trying to exercise these types, which aren't provided when `_LIBCPP_HAS_NO_THREADS`. Better would be to have a test-suite version of the macro (to express the fact that the test suite supports being used when threads are not available), but that's for a different patch.
How about I do that patch just before announcing P0898 is implemented?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97162/new/
https://reviews.llvm.org/D97162
More information about the libcxx-commits
mailing list