File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ class TestConstructors : public TestFixture {
7979 TEST_CASE (simple12); // ticket #4620
8080 TEST_CASE (simple13); // #5498 - no constructor, c++11 assignments
8181 TEST_CASE (simple14); // #6253 template base
82+ TEST_CASE (simple15); // #8942 multiple arguments, decltype
8283
8384 TEST_CASE (noConstructor1);
8485 TEST_CASE (noConstructor2);
@@ -486,6 +487,23 @@ class TestConstructors : public TestFixture {
486487 ASSERT_EQUALS (" " , errout.str ());
487488 }
488489
490+ void simple15 () { // #8942
491+ check (" class A\n "
492+ " {\n "
493+ " public:\n "
494+ " int member;\n "
495+ " };\n "
496+ " class B\n "
497+ " {\n "
498+ " public:\n "
499+ " B(const decltype(A::member)& x, const decltype(A::member)& y) : x(x), y(y) {}\n "
500+ " private:\n "
501+ " const decltype(A::member)& x;\n "
502+ " const decltype(A::member)& y;\n "
503+ " };\n " );
504+ ASSERT_EQUALS (" " , errout.str ());
505+ }
506+
489507 void noConstructor1 () {
490508 // There are nonstatic member variables - constructor is needed
491509 check (" class Fred\n "
You can’t perform that action at this time.
0 commit comments