We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c17b7e2 commit 036aa9bCopy full SHA for 036aa9b
1 file changed
test/teststl.cpp
@@ -6544,6 +6544,17 @@ class TestStl : public TestFixture {
6544
"}\n",
6545
dinit(CheckOptions, $.inconclusive = true));
6546
ASSERT_EQUALS("", errout_str());
6547
+
6548
+ check("struct S { int i; };\n"
6549
+ "void f() {\n"
6550
+ " std::vector<std::unique_ptr<S>> v;\n"
6551
+ " for (int i = 0; i < 5; ++i) {\n"
6552
+ " std::unique_ptr<S>& r{ v.emplace_back(std::make_unique<S>()) };\n"
6553
+ " r->i = 1;\n"
6554
+ " }\n"
6555
+ "}\n",
6556
+ dinit(CheckOptions, $.inconclusive = true));
6557
+ ASSERT_EQUALS("", errout_str());
6558
}
6559
6560
void findInsert() {
0 commit comments