m***t 发帖数: 254 | 1 i remember c++ faq said only use it in constructor since it is so expensive,
is that generally true? | c******n 发帖数: 145 | 2 If you mean throw...catch, I think all function should throw an exception
when they cannot fulfill the promises.
I guess what you want to say is the "class invariant"??? It is often called
at the end of the CTOR. | k****f 发帖数: 3794 | 3 因为构造函数没法返回值的,所以只能用throw/catch
其他函数都可以返回错误信息的。
called
【在 c******n 的大作中提到】 : If you mean throw...catch, I think all function should throw an exception : when they cannot fulfill the promises. : I guess what you want to say is the "class invariant"??? It is often called : at the end of the CTOR.
|
|