EricWF closed this revision.
EricWF added a comment.
r287728.
https://reviews.llvm.org/D26903
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
EricWF accepted this revision.
EricWF added a reviewer: EricWF.
EricWF added a comment.
This revision is now accepted and ready to land.
Checking these into libc++ shortly. (But I'm disabling them for libc++ for
obvious reasons).
https://reviews.llvm.org/D26903
__
EricWF marked an inline comment as done.
EricWF added inline comments.
Comment at:
test/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp:487
+// This is why variant should SFINAE member hash. :-)
+template class std::variant;
+
CaseyCarter wrote:
CaseyCarter added inline comments.
Comment at:
test/std/utilities/variant/variant.helpers/variant_alternative.pass.cpp:33
+void test() {
+static_assert(std::is_same_v<
+typename std::variant_alternative::type, E>, "");
STL_MSFT wrote:
> EricWF wrote:
CaseyCarter added a comment.
Other than the note in variant.variant\variant.swap\swap.pass.cpp, all passes
pass and all fails fail with out implementation.
Comment at:
test/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp:487
+// This is why variant should SFI
STL_MSFT added inline comments.
Comment at:
test/std/utilities/variant/variant.helpers/variant_alternative.pass.cpp:33
+void test() {
+static_assert(std::is_same_v<
+typename std::variant_alternative::type, E>, "");
EricWF wrote:
> STL_MSFT wrote:
>
EricWF marked 45 inline comments as done.
EricWF added a comment.
Address almost all inline comments.
Comment at: test/std/utilities/variant/variant.get/get_if_index.pass.cpp:92
+V v(42l);
+ASSERT_SAME_TYPE(decltype(std::get_if<1>(std::addressof(v))), long*);
+
EricWF added inline comments.
Comment at: test/std/utilities/variant/variant.helpers/variant_size.pass.cpp:41
+{
+test, 0>();
+test, 1>();
CaseyCarter wrote:
> STL_MSFT wrote:
> > Hmm, is this cromulent now that empty variants are forbidden?
> It's not fo
CaseyCarter added inline comments.
Comment at: test/std/utilities/variant/variant.hash/hash.pass.cpp:34
+
+void test_hash_variant()
+{
This is non-portable. The fact that both your implementation and mine pass this
test suggests they both have poor QoI: There's
EricWF added a comment.
Thanks guys! I'll address all these tomorrow!
https://reviews.llvm.org/D26903
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
STL_MSFT added a comment.
Found some minor issues.
Comment at: test/std/utilities/variant/variant.get/get_if_index.pass.cpp:92
+V v(42l);
+ASSERT_SAME_TYPE(decltype(std::get_if<1>(std::addressof(v))), long*);
+assert(*std::get_if<1>(std::addressof(v)) ==
CaseyCarter added inline comments.
Comment at: test/std/utilities/variant/variant.relops/relops.pass.cpp:60
+inline bool operator>(MakeEmptyT const&, MakeEmptyT const&) { assert(false); }
+inline bool operator>=(MakeEmptyT const&, MakeEmptyT const&) { assert(false); }
+
CaseyCarter added a comment.
I'll take a look at these tomorrow; I don't have easy access to my
implementation with the changes from P0510 and P0504 from home (it's waiting on
a compiler bugfix to checkin).
Comment at: test/std/utilities/variant/variant.get/get_type.pass.cpp:
13 matches
Mail list logo