作者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