作者allstarschh (allstars)
看板C_and_CPP
标题[问题] Stroustrup C++的问题 part2
时间Thu Mar 19 00:20:19 2009
首先先感谢几位大大先前详细的explaination
然後我现在又有几个问题
1.Sec13.4 Using Template Arguments to Specify Policy
主要在讲用Template class来specify operation(less,eq,..)
在p339 倒数第三段最後面 他说了
whereas inlining a call through a pointer to function
requires exceptional attention from a compiler
在这里指的exceptional attention是指什麽呢?
写C写久了会很习惯用pointer to function
但想知道这里不建议使用pfn的原因
2. Sec14.2 Grouping of Exceptions
第一段的第三行有说
the effect of a throw is to unwind the stack until a
suitable catch is found
他说的unwind是什麽意思呢
是指一般function return时stack会清掉的意思吗?
(esp回到ebp)
如果是这样的话
throw 出来的那个object(or pointer,reference)
他是存在哪里的??
stack被清掉那exception应该也会被清吧???
不太了解throw/catch是怎麽implement的
所以想请教
感谢
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 118.166.224.140
1F:推 legnaleurc:类似setjump / longjump 03/19 01:51