8sa1-gcc/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-59483.C
Ville Voutilainen adb50dfbf6 re PR c++/59483 (A nested lambda fails to find a protected name with qualified name)
PR c++/59483
	PR c++/61148
	* search.c (accessible_p): Use current_nonlambda_class_type.
	* semantics.c (check_accessibility_of_qualified_id): Likewise.

From-SVN: r211147
2014-06-02 16:47:55 -04:00

32 lines
259 B
C

// PR c++/59483
// { dg-do compile { target c++11 } }
struct X
{
protected:
int i;
};
struct Y : X
{
Y()
{
[&]{ X::i = 3; }();
}
};
template <class T>
struct Y2 : T
{
Y2()
{
[&]{ T::i = 3; }();
}
};
int main()
{
Y y;
Y2<X> y2;
}