C++函数调用是表达式吗?

Is C++ function call an expression?

一个函数产生一个结果,可以作为另一个函数参数的参数。所以,函数调用是这样的:

f(1,2,3)

被认为是"expression"? 谢谢

C++ 标准(N3376,§5.1)将表达式指定为:

An expression is a sequence of operators and operands that specifies a computation. An expression can result in a value and can cause side effects.

同一部分的进一步内容 (§5.2.2):

A function call is a postfix expression followed by parentheses containing a possibly empty, comma-separated list of expressions which constitute the arguments to the function.

简而言之,是的。

根据 ISO/IEC 14882:2014 的 5.2.2 [expr.call] 第 1 段,函数调用是 [postfix] 表达式:

A function call is a postfix expression followed by parentheses containing a possibly empty, comma-separated list of initializer-clauses which constitute the arguments to the function. ...