Why does C++ need language modifications to be “managed”?

前端 未结 11 1955
隐瞒了意图╮
隐瞒了意图╮ 2021-02-14 20:18

Why can\'t a compiler be written that manages what needs to be managed in C++ code (i.e. to make it \"CLR compatible\")?

Maybe with some compromise, li

11条回答
  •  长情又很酷
    2021-02-14 20:42

    Qt framework does almost that. I.e. it has smart pointers, that automatically set to null, when the object that they point to is destroyed. And still it's a native C++, after parsed by moc(meta object compiler).

提交回复
热议问题