Commit 04dcd570 by Jason Merrill Committed by Jason Merrill

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.

From-SVN: r252936
parent 8b7e9dba
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> 2017-09-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
Paolo Carlini <paolo.carlini@oracle.com> Paolo Carlini <paolo.carlini@oracle.com>
......
...@@ -3347,8 +3347,7 @@ process_outer_var_ref (tree decl, tsubst_flags_t complain) ...@@ -3347,8 +3347,7 @@ process_outer_var_ref (tree decl, tsubst_flags_t complain)
time to implicitly capture. */ time to implicitly capture. */
if (context == containing_function if (context == containing_function
&& DECL_TEMPLATE_INFO (containing_function) && DECL_TEMPLATE_INFO (containing_function)
&& any_dependent_template_arguments_p (DECL_TI_ARGS && uses_template_parms (DECL_TI_ARGS (containing_function)))
(containing_function)))
return decl; return decl;
/* Core issue 696: "[At the July 2009 meeting] the CWG expressed /* Core issue 696: "[At the July 2009 meeting] the CWG expressed
......
// 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); };
}
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment