Cast to a Child

前端 未结 4 1749
无人及你
无人及你 2021-01-23 07:47

What I\'m actually trying to do is cast a constructed moneypunct to the punct_facet in this question without writing a copy constructor as in this answ

4条回答
  •  -上瘾入骨i
    2021-01-23 08:25

    If the parent ISA Child then the Child.func() will be called anyway.

    If the parent is not a Child and you want the Child.func to be called then your design is broken.

提交回复
热议问题