-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我是男孩提交作业 #39
我是男孩提交作业 #39
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
写的没问题,但是我看这 Markdown 语法,我就知道,你绝对不怎么写 Markdown,格式有些糟糕了
|
||
# 作业 | ||
|
||
#### 分析 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
抽象的 Markdown 标题
} | ||
``` | ||
|
||
*简述代码使用的折叠表达式的语法、效果、详细解析。* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
抽象的居中
(tmp = ... = (res.push_back(args), false)); | ||
``` | ||
|
||
代码中存在`= ... =`,符合`运算符 ... 运算符`形势,即为二元折叠。又因`...`在“形参包(args)”左边,折叠表达式为一个二元左折叠。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯,对
(((tmp = (res.push_back(3.5), false)) = (res.push_back(1), false)) = (res.push_back(2), false)); | ||
``` | ||
|
||
赋值表达式从右向左,所以从后向前push到res。逗号表达式返回右边的false,tmp为flase(没什么用)。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
也别说没啥用,你就说和之前形参包的展开中的数组 int _ []
那玩意一样,是为了:“创造语境,符合语法”
好的国王,以后注意 |
No description provided.