无论是哪一种,除非程序员有权访问类c的源代码,否则他无法预知何时会发生编译错误。
Either way, unless the programmer has access to the source code for class c, he will have no way of predicting when compilation errors would occur.
该方法的问题是,和为错误的构造函数调用报告错误一样,程序员将无法预知其程序的某一次运行将崩溃。
The problem with this approach is that, like signaling errors for bad constructor calls, the programmer will have no way of predicting that a given run of his program will crash.
应用推荐