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

fix calling base class private method #253

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

Dushistov
Copy link
Contributor

because of bugs gcc/clang accept this before,
but now clang 19.x gives compile time error,
because of "untack" method is private:

https://godbolt.org/z/hd9n1o3br

because of bugs gcc/clang accept this before,
but now clang 19.1.6 gives compile error,
because of "untack" method is private
@borrrden
Copy link
Member

This...is so wild. It's probably been like this for years, and MSVC still compiles it. Was this some sort of universal misinterpretation of the C++ spec of something?

@borrrden borrrden requested a review from snej January 17, 2025 23:17
@Dushistov
Copy link
Contributor Author

This...is so wild. It's probably been like this for years, and MSVC still compiles it. Was this some sort of universal
misinterpretation of the C++ spec of something?

gcc also still compiles this just fine. There is for example another example llvm/llvm-project#16784 , where gcc warn about private access, while clang compile just fine.

As I understand, the C++ standard tells about this: no diagnostic required.
Therefore, the compiler may or may not report an error if the template has not been instantiated.
Another story if template was used in code, then all C++ compilers have to reports errors.

@snej snej merged commit 230b240 into couchbase:master Jan 21, 2025
3 checks passed
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 this pull request may close these issues.

3 participants