在“的内部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