cpp's most vexing parse

来源:互联网 发布:竹子阿矛离婚知乎 编辑:程序博客网 时间:2024/06/06 02:04

C++ has parsing ambiguity between a function declaration and a constructor invocation when the constructor arguments are temporaries. This is known as the "most vexing parse" problem. C++09 doesn't resolve this ambiguity but there are several things you can do to avert it in the first place. Awareness is the first step.

当参数是临时变量的时候会出现。

[refer to ]

http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=439



0 0
原创粉丝点击