0

I have this code:

class A
{
protected: 
    A(int i, int j) {}
};


class B: public A
{
    A Foo() { return A(1,2); }
};

It builds all right in Visual Studio 2010 but fails in 2015 because B::Foo() can not access A's protected constructor. What gives?

Claudio
  • 10,614
  • 4
  • 31
  • 71
obamator
  • 478
  • 3
  • 13

0 Answers0