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

[16.4.6.10] missing dereference #6731

Open
ilazaric opened this issue Dec 12, 2023 · 3 comments · May be fixed by #6748
Open

[16.4.6.10] missing dereference #6731

ilazaric opened this issue Dec 12, 2023 · 3 comments · May be fixed by #6748

Comments

@ilazaric
Copy link

https://eel.is/c++draft/res.on.data.races#3

A C++ standard library function shall not directly or indirectly modify objects ([intro.multithread]) accessible by threads other than the current thread unless the objects are accessed directly or indirectly via the function's non-const arguments, including this.

Shouldn't this section specify *this instead of this ?
this is never const https://eel.is/c++draft/expr.prim.this#3

const Class obj;
obj.const_mem_fn(); // `this` is `const Class*`
@ilazaric
Copy link
Author

Note previous paragraph also mentions this, but it's okay
It would also be okay if it were *this due to std::addressof I think

@frederick-vs-ja
Copy link
Contributor

It seems better to say implicit object argument instead of this.

@frederick-vs-ja
Copy link
Contributor

frederick-vs-ja commented Dec 15, 2023

[expr.call]/6 currently says "the this parameter", while this is not the parameter itself but a pointer to it.

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

Successfully merging a pull request may close this issue.

2 participants