Skip to content

Commit

Permalink
Update testclass.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github authored Jul 10, 2024
1 parent 415516c commit a8b33e5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/testclass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ class TestClass : public TestFixture {
TEST_CASE(const_shared_ptr);
TEST_CASE(constPtrToConstPtr);
TEST_CASE(constTrailingReturnType);
TEST_CASE(constRefQualified);
TEST_CASE(staticArrayPtrOverload);
TEST_CASE(qualifiedNameMember); // #10872

Expand Down Expand Up @@ -7496,6 +7497,16 @@ class TestClass : public TestFixture {
ASSERT_EQUALS("", errout_str());
}

void constRefQualified() { // #12920
checkConst("class Fred {\n"
"public:\n"
" const Data& get() & { return data; }\n"
"private:\n"
" Data data;\n"
"};\n");
ASSERT_EQUALS("", errout_str());
}

void staticArrayPtrOverload() {
checkConst("struct S {\n"
" template<size_t N>\n"
Expand Down

0 comments on commit a8b33e5

Please sign in to comment.