mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 23:24:59 +00:00
SmallVector: Move emplace_back to SmallVectorImpl.
This resolves the strange effect that emplace_back is only available when the type contained in the vector is not trivially copyable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228496 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -896,6 +896,14 @@ TEST(SmallVectorTest, EmplaceBack) {
|
||||
EXPECT_TRUE(V.back().A2.State == EAS_RValue);
|
||||
EXPECT_TRUE(V.back().A3.State == EAS_LValue);
|
||||
}
|
||||
{
|
||||
SmallVector<int, 1> V;
|
||||
V.emplace_back();
|
||||
V.emplace_back(42);
|
||||
EXPECT_EQ(2U, V.size());
|
||||
EXPECT_EQ(0, V[0]);
|
||||
EXPECT_EQ(42, V[1]);
|
||||
}
|
||||
}
|
||||
|
||||
} // end namespace
|
||||
|
Reference in New Issue
Block a user