File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -214,6 +214,7 @@ class TestClass : public TestFixture {
214
214
TEST_CASE (const_shared_ptr);
215
215
TEST_CASE (constPtrToConstPtr);
216
216
TEST_CASE (constTrailingReturnType);
217
+ TEST_CASE (constRefQualified);
217
218
TEST_CASE (staticArrayPtrOverload);
218
219
TEST_CASE (qualifiedNameMember); // #10872
219
220
@@ -7496,6 +7497,16 @@ class TestClass : public TestFixture {
7496
7497
ASSERT_EQUALS (" " , errout_str ());
7497
7498
}
7498
7499
7500
+ void constRefQualified () { // #12920
7501
+ checkConst (" class Fred {\n "
7502
+ " public:\n "
7503
+ " const Data& get() & { return data; }\n "
7504
+ " private:\n "
7505
+ " Data data;\n "
7506
+ " };\n " );
7507
+ ASSERT_EQUALS (" " , errout_str ());
7508
+ }
7509
+
7499
7510
void staticArrayPtrOverload () {
7500
7511
checkConst (" struct S {\n "
7501
7512
" template<size_t N>\n "
You can’t perform that action at this time.
0 commit comments