What about the constructors?
We can start with the one-argument constructor and see how we would like it to work:
Expr::Expr(int n):
p(new IntExpr(n)) { }
What does this desired usage say about class ExprBase?
Previous slide
Next slide
Back to first slide
View graphic version