Skip to content
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

Merged
merged 1 commit into from
Apr 17, 2024
Merged

我是男孩提交作业 #39

merged 1 commit into from
Apr 17, 2024

Conversation

zhuzhu9
Copy link
Contributor

@zhuzhu9 zhuzhu9 commented Apr 17, 2024

No description provided.

@Mq-b Mq-b added the homework 作业 label Apr 17, 2024
Copy link
Owner

@Mq-b Mq-b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

写的没问题,但是我看这 Markdown 语法,我就知道,你绝对不怎么写 Markdown,格式有些糟糕了


# 作业

#### 分析
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

抽象的 Markdown 标题

}
```

*简述代码使用的折叠表达式的语法、效果、详细解析。*
Copy link
Owner

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)”左边,折叠表达式为一个二元左折叠。
Copy link
Owner

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(没什么用)。
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

也别说没啥用,你就说和之前形参包的展开中的数组 int _ [] 那玩意一样,是为了:“创造语境,符合语法

@Mq-b Mq-b merged commit 54f55fd into Mq-b:main Apr 17, 2024
@Mq-b Mq-b added the merge 已合并 label Apr 17, 2024
@zhuzhu9
Copy link
Contributor Author

zhuzhu9 commented Apr 17, 2024

好的国王,以后注意

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
homework 作业 merge 已合并
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants