https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85790
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- Fixed by r12-926 c++: implicit deduction guides, protected access Jonathan raised this issue with CWG, and there seems to be general agreement that a deduction guide generated from a constructor should have access to the same names that the constructor has access to. That seems to be as easy as setting DECL_CONTEXT. gcc/cp/ChangeLog: * pt.c (build_deduction_guide): Treat the implicit deduction guide as a member of the class. gcc/testsuite/ChangeLog: * g++.dg/cpp1z/class-deduction-access1.C: New test. * g++.dg/cpp1z/class-deduction-access2.C: New test.