is there any way to prevent the derived class from initializing a base class reference

后端 未结 0 1164
-上瘾入骨i
-上瘾入骨i 2021-02-12 03:38

I have Base and Derived classes, and this code:

Derived d; Base& b = d;

Is there any cast in this initialization? Сan i theoretically disable

相关标签:
回答
  • 消灭零回复
提交回复
热议问题