struct A
{
A( int ) { /* ... */ }
virtual ~A() = default ;
virtualvoid update() { /* ... */ }
};
struct B : A
{
using base = A ; // 'base' is a type alias for 'A'
using base::base ; // inheriting constructor
// equivalent to B( int v ) : base(v) {}
B() : base(5) {}
virtualvoid update() override
{
base::update() ; // same as A::update() ;
std::cout << "called from derived class\n" ;
}
};