[libcxx-commits] [PATCH] D116884: [libcxx][test] optional's comparisons with optional are not portably constrained
Casey Carter via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jan 13 20:26:41 PST 2022
CaseyCarter updated this revision to Diff 399876.
CaseyCarter marked 3 inline comments as done.
CaseyCarter added a comment.
Address review comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116884/new/
https://reviews.llvm.org/D116884
Files:
libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable.compile.pass.cpp
libcxx/test/std/concepts/concepts.compare/concepts.totallyordered/totally_ordered.pass.cpp
Index: libcxx/test/std/concepts/concepts.compare/concepts.totallyordered/totally_ordered.pass.cpp
===================================================================
--- libcxx/test/std/concepts/concepts.compare/concepts.totallyordered/totally_ordered.pass.cpp
+++ libcxx/test/std/concepts/concepts.compare/concepts.totallyordered/totally_ordered.pass.cpp
@@ -117,7 +117,6 @@
// static_assert(!std::totally_ordered<std::deque<A> >);
// static_assert(!std::totally_ordered<std::forward_list<A> >);
// static_assert(!std::totally_ordered<std::list<A> >);
-static_assert(!std::totally_ordered<std::optional<A> >);
// static_assert(!std::totally_ordered<std::set<A> >);
// static_assert(!std::totally_ordered<std::vector<A> >);
} // namespace standard_types
Index: libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable.compile.pass.cpp
===================================================================
--- libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable.compile.pass.cpp
+++ libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable.compile.pass.cpp
@@ -26,10 +26,6 @@
#include <unordered_set>
#include <vector>
-#ifndef _LIBCPP_HAS_NO_THREADS
-# include <mutex>
-#endif
-
#include "compare_types.h"
namespace fundamentals {
@@ -87,26 +83,17 @@
} // namespace fundamentals
namespace standard_types {
-static_assert(std::equality_comparable<std::array<int, 10> >);
-static_assert(std::equality_comparable<std::deque<int> >);
-static_assert(std::equality_comparable<std::forward_list<int> >);
-static_assert(std::equality_comparable<std::list<int> >);
-
-#ifndef _LIBCPP_HAS_NO_THREADS
-static_assert(!std::equality_comparable<std::lock_guard<std::mutex> >);
-static_assert(std::equality_comparable<std::map<int, void*> >);
-static_assert(!std::equality_comparable<std::mutex>);
-static_assert(
- !std::equality_comparable<std::optional<std::lock_guard<std::mutex> > >);
-static_assert(!std::equality_comparable<std::optional<std::mutex> >);
-#endif
-
-static_assert(std::equality_comparable<std::optional<int> >);
-static_assert(std::equality_comparable<std::set<int> >);
-static_assert(std::equality_comparable<std::unordered_map<int, void*> >);
-static_assert(std::equality_comparable<std::unordered_set<int> >);
-static_assert(std::equality_comparable<std::vector<bool> >);
-static_assert(std::equality_comparable<std::vector<int> >);
+static_assert(std::equality_comparable<std::array<int, 10>>);
+static_assert(std::equality_comparable<std::deque<int>>);
+static_assert(std::equality_comparable<std::forward_list<int>>);
+static_assert(std::equality_comparable<std::list<int>>);
+static_assert(std::equality_comparable<std::map<int, void*>>);
+static_assert(std::equality_comparable<std::optional<int>>);
+static_assert(std::equality_comparable<std::set<int>>);
+static_assert(std::equality_comparable<std::unordered_map<int, void*>>);
+static_assert(std::equality_comparable<std::unordered_set<int>>);
+static_assert(std::equality_comparable<std::vector<bool>>);
+static_assert(std::equality_comparable<std::vector<int>>);
} // namespace standard_types
namespace types_fit_for_purpose {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116884.399876.patch
Type: text/x-patch
Size: 3224 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220114/60fcae30/attachment.bin>
More information about the libcxx-commits
mailing list