a****a 发帖数: 1264 | 1 今天面试被问了个问题,实在是不知道答案,请牛人们指点一下。谢谢
问题如下:
If I need to write a class, ClassA as part of a static library, then how can
I enforce that instances only be allocated on the stack, but not on the
heap, at compile-time? | t****t 发帖数: 6806 | 2 make operator new private
can
【在 a****a 的大作中提到】 : 今天面试被问了个问题,实在是不知道答案,请牛人们指点一下。谢谢 : 问题如下: : If I need to write a class, ClassA as part of a static library, then how can : I enforce that instances only be allocated on the stack, but not on the : heap, at compile-time?
| a****a 发帖数: 1264 | 3 Thanks again.
【在 t****t 的大作中提到】 : make operator new private : : can
|
|