https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85815
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> --- Author: jason Date: Mon Jun 11 22:01:55 2018 New Revision: 261460 URL: https://gcc.gnu.org/viewcvs?rev=261460&root=gcc&view=rev Log: PR c++/85815 - reference to member of enclosing template. * search.c (lookup_base): Use currently_open_class. (lookup_member): Use it regardless of -fconcepts. * parser.c (cp_parser_postfix_dot_deref_expression): Check it. Added: branches/gcc-8-branch/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-dependent1.C Modified: branches/gcc-8-branch/gcc/cp/ChangeLog branches/gcc-8-branch/gcc/cp/class.c branches/gcc-8-branch/gcc/cp/parser.c branches/gcc-8-branch/gcc/cp/search.c