[Bug c++/58972] Lambda can't access private members

ville.voutilainen at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Dec 18 14:11:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58972

--- Comment #11 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
Reduced further:

class base
{
protected:
  typedef int type;
};


template <typename T>
class derive: public base
{
public:
  void foo()
  {
    struct f_t {
      f_t(base::type a) {}
    };
  }
};

int main()
{
  derive<char> d;
  d.foo();
}



More information about the Gcc-bugs mailing list