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
32 lines
259 B
C
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;
|
|
}
|