8sa1-gcc/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle5.C
Jason Merrill b3eae0dd17 Fix lambdas in template default argument of inherited ctor.
* method.c (synthesized_method_base_walk): Replace an inherited
	template with its specialization.
	(synthesized_method_walk): Make inheriting_ctor a pointer.
	(maybe_explain_implicit_delete, explain_implicit_non_constexpr)
	(deduce_inheriting_ctor, implicitly_declare_fn): Adjust.

From-SVN: r251426
2017-08-29 15:40:41 -04:00

16 lines
244 B
C

// { dg-do compile { target c++11 } }
// { dg-final { scan-assembler "_ZZN1AIiEC4IiEET_S2_Ed_NKUlvE_clEv" } }
template <class T> struct A
{
template <class U>
A(U, U = []{ return 42; }());
};
struct B: A<int>
{
using A::A;
};
B b(24);