Skip to content

Commit ceff00e

Browse files
Update testclass.cpp
1 parent ee2cb98 commit ceff00e

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

test/testclass.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8119,6 +8119,21 @@ class TestClass : public TestFixture {
81198119
" std::string st;\n"
81208120
"};");
81218121
ASSERT_EQUALS("", errout_str());
8122+
8123+
checkInitializationListUsage("struct S {\n" // #14189
8124+
" S() {}\n"
8125+
" int i{};\n"
8126+
"};\n"
8127+
"struct T { explicit T(const S&); };\n"
8128+
"class C {\n"
8129+
" C() {\n"
8130+
" S s;\n"
8131+
" s.i = 1;\n"
8132+
" p = std::make_unique<T>(s);
8133+
" }\n"
8134+
" std::unique_ptr<T> p;\n"
8135+
"};");
8136+
ASSERT_EQUALS("", errout_str());
81228137
}
81238138
81248139

0 commit comments

Comments
 (0)