When an array is created by a subexpression, what happens with the temporaries therein?

大兔子大兔子 提交于 2019-12-03 22:44:11

I don't think there's a contradiction.

5.2.2 clearly says what a function call is. 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.

There doesn't seem to be a function call to B::B(A const&) anywhere in your program, so I don't see how the second passage applies.

EDIT the above is probably incorrect, given 1.9p10 etc.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!