* semantics.c (process_outer_var_ref): Check uses_template_parms
instead of any_dependent_template_arguments_p.
From-SVN: r252936
+2017-09-18 Jason Merrill <jason@redhat.com>
+
+ PR c++/82069 - ICE with lambda in template
+ * semantics.c (process_outer_var_ref): Check uses_template_parms
+ instead of any_dependent_template_arguments_p.
+
2017-09-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
Paolo Carlini <paolo.carlini@oracle.com>
time to implicitly capture. */
if (context == containing_function
&& DECL_TEMPLATE_INFO (containing_function)
- && any_dependent_template_arguments_p (DECL_TI_ARGS
- (containing_function)))
+ && uses_template_parms (DECL_TI_ARGS (containing_function)))
return decl;
/* Core issue 696: "[At the July 2009 meeting] the CWG expressed
--- /dev/null
+// PR c++/82069
+// { dg-do compile { target c++11 } }
+
+struct A {
+ void foo(int *);
+};
+struct B : A {
+ template <typename> void bar(int *p1) {
+ [&] { foo(p1); };
+ }
+};