Google了一下……
http://net.pku.edu.cn/~course/cs101/2007/resource/CppHowToProgram/5e/html/ch16lev1sec20.html16.27Write a conditional expression that returns either a double or an int. Provide an int catch handler and a double catch handler. Show that only the double catch handler executes, regardless of whether the int or the double is returned.
这个?
如果说的是true ? throw 1 : throw 1.0那就是书上错了。
大概只能解释为在说throw true ? 1 : 1.0这样,throw前就是double,和throw没什么关系。但是实际上returns either a double or an int这个说法就有问题。条件表达式的类型是确定的。