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

普通对象可以更新常成员变量?? #77

Closed
ifls opened this issue Apr 6, 2021 · 3 comments
Closed

普通对象可以更新常成员变量?? #77

ifls opened this issue Apr 6, 2021 · 3 comments

Comments

@ifls
Copy link

ifls commented Apr 6, 2021

c++ const 这一节
A b; // 普通对象,可以调用全部成员函数、更新常成员变量

@huihut
Copy link
Owner

huihut commented Apr 6, 2021

当常成员变量是指针的时候可以更新,具体在 这个issue 讨论过。

huihut added a commit that referenced this issue Apr 13, 2021
@huihut
Copy link
Owner

huihut commented Apr 13, 2021

这里确实错了,常成员变量不能被更新,已改

@huihut huihut closed this as completed Apr 13, 2021
@jinfeihan57
Copy link

如果函数以mutable修饰,就可以修改const成员变量了。

yyfst pushed a commit to yyfst/interview that referenced this issue Aug 17, 2022
Rename 12.2.3 zk是如何保证事物的顺序一致性.md to 12.2.3 zk是如何保证事务的顺序一致性.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants