1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

2nd attempt to fix ambiguities because of ADL

llvm-svn: 345690
This commit is contained in:
Matthias Braun 2018-10-31 01:58:00 +00:00
parent a7740d2e11
commit 4b5a78ebda

View File

@ -365,23 +365,20 @@ TEST(STLExtrasTest, ADLTest) {
}
TEST(STLExtrasTest, EmptyTest) {
// Try to avoid ambiguities with C++17 headers.
using llvm::empty;
std::vector<void*> V;
EXPECT_TRUE(empty(V));
EXPECT_TRUE(llvm::empty(V));
V.push_back(nullptr);
EXPECT_FALSE(empty(V));
EXPECT_FALSE(llvm::empty(V));
std::initializer_list<int> E = {};
std::initializer_list<int> NotE = {7, 13, 42};
EXPECT_TRUE(empty(E));
EXPECT_FALSE(empty(NotE));
EXPECT_TRUE(llvm::empty(E));
EXPECT_FALSE(llvm::empty(NotE));
auto R0 = make_range(V.begin(), V.begin());
EXPECT_TRUE(empty(R0));
EXPECT_TRUE(llvm::empty(R0));
auto R1 = make_range(V.begin(), V.end());
EXPECT_FALSE(empty(R1));
EXPECT_FALSE(llvm::empty(R1));
}
TEST(STLExtrasTest, EarlyIncrementTest) {