[libcxx-commits] [PATCH] D111738: [libcxx][test] Add tests for std::vector comparisons
Ruslan Arutyunyan via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Oct 13 15:36:26 PDT 2021
rarutyun added inline comments.
================
Comment at: libcxx/test/std/containers/sequences/vector/compare.fail.cpp:25
+ {
+ std::vector<LessCompOnly<0>> c;
+ // expected-error@*:* {{invalid operands to binary expression}}
----------------
you don't disable this test for C++03 but you use `vector<something>>` without the space between `>>` that is treated as operator>> for C++ prior 11. We need enable this test starting from C++11 or fix that. Let's see how it's done for other tests and make it consistent.
================
Comment at: libcxx/test/std/containers/sequences/vector/compare.pass.cpp:37
+ {
+ const std::vector<int> c1{1, 2, 1}, c2{1, 2, 2};
+ assert(testComparisons6(c1, c2, false, true));
----------------
You use braced-init-list for `std::vector` initialization, which, of course, is allowed since C++11. Thus, this test fails on C++03. Need to fix that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111738/new/
https://reviews.llvm.org/D111738
More information about the libcxx-commits
mailing list