在「的內部C++對象模型」,作者給出的代碼,可能不夠明確下面的例子中,要求解析器向前看來解決它:這個C++表達式是如何解釋爲一個調用?
...if C++ were to throw off the C declaration syntax, lookahead would not be required to determine that the following is an invocation of pf rather than its definition:
// don’t know if declaration or invocation // until see the integer constant 1024 int (*pf)(1024);
他暗示,這被解釋爲調用的功能pf
。我無法看到pf
的聲明可能會成爲有效的調用。
是的,我認爲作者在這裏犯了一個錯誤。 – 2013-03-15 11:00:31
文字混淆。在重讀時,我認爲這意味着該行將是一個在沒有C語句syntax_的假設語言中的調用。 – MSalters 2013-03-15 11:24:50