llvm.org GIT mirror llvm / 4f27756
2nd attempt to fix ambiguities because of ADL git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345690 91177308-0d34-0410-b5e6-96231b3b80d8 Matthias Braun 1 year, 16 days ago
1 changed file(s) with 6 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
364364 }
365365
366366 TEST(STLExtrasTest, EmptyTest) {
367 // Try to avoid ambiguities with C++17 headers.
368 using llvm::empty;
369
370367 std::vector V;
371 EXPECT_TRUE(empty(V));
368 EXPECT_TRUE(llvm::empty(V));
372369 V.push_back(nullptr);
373 EXPECT_FALSE(empty(V));
370 EXPECT_FALSE(llvm::empty(V));
374371
375372 std::initializer_list E = {};
376373 std::initializer_list NotE = {7, 13, 42};
377 EXPECT_TRUE(empty(E));
378 EXPECT_FALSE(empty(NotE));
374 EXPECT_TRUE(llvm::empty(E));
375 EXPECT_FALSE(llvm::empty(NotE));
379376
380377 auto R0 = make_range(V.begin(), V.begin());
381 EXPECT_TRUE(empty(R0));
378 EXPECT_TRUE(llvm::empty(R0));
382379 auto R1 = make_range(V.begin(), V.end());
383 EXPECT_FALSE(empty(R1));
380 EXPECT_FALSE(llvm::empty(R1));
384381 }
385382
386383 TEST(STLExtrasTest, EarlyIncrementTest) {