Skip to content

error: no member named 'get' in the global namespace #98775

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

Closed
kraj opened this issue Jul 13, 2024 · 3 comments
Closed

error: no member named 'get' in the global namespace #98775

kraj opened this issue Jul 13, 2024 · 3 comments
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" needs-reduction Large reproducer that should be reduced into a simpler form

Comments

@kraj
Copy link
Contributor

kraj commented Jul 13, 2024

With latest clang/main, seeing this error in compiling abseil-cpp from chromium using libc++ for runtime

clang version 19.0.0 (/home/kraj/work/llvm-project 1a4118f155f3446577cb0a93479d40fd8606a570)                                                                          Target: aarch64-unknown-linux

clang++ -target aarch64-linux hash.i -std=gnu++20

../../../../../git/src/3rdparty/chromium/third_party/abseil-cpp/absl/container/internal/compressed_tuple.h:252:42: error: no member named 'get' in the global namespace
  252 |     return std::move(*this).StorageT<I>::get();
      |                                        ~~^
../../../../../git/src/3rdparty/chromium/third_party/abseil-cpp/absl/container/internal/compressed_tuple.h:257:43: error: no member named 'get' in the global namespace
  257 |     return absl::move(*this).StorageT<I>::get();
      |                                         ~~^
2 errors generated.

hash.i.zip

@EugeneZelenko EugeneZelenko added clang:frontend Language frontend issues, e.g. anything involving "Sema" and removed new issue labels Jul 14, 2024
@llvmbot
Copy link
Member

llvmbot commented Jul 14, 2024

@llvm/issue-subscribers-clang-frontend

Author: Khem Raj (kraj)

With latest clang/main, seeing this error in compiling abseil-cpp from chromium using libc++ for runtime
clang version 19.0.0 (/home/kraj/work/llvm-project 1a4118f155f3446577cb0a93479d40fd8606a570)                                                                          Target: aarch64-unknown-linux

clang++ -target aarch64-linux hash.i -std=gnu++20

../../../../../git/src/3rdparty/chromium/third_party/abseil-cpp/absl/container/internal/compressed_tuple.h:252:42: error: no member named 'get' in the global namespace
  252 |     return std::move(*this).StorageT&lt;I&gt;::get();
      |                                        ~~^
../../../../../git/src/3rdparty/chromium/third_party/abseil-cpp/absl/container/internal/compressed_tuple.h:257:43: error: no member named 'get' in the global namespace
  257 |     return absl::move(*this).StorageT&lt;I&gt;::get();
      |                                         ~~^
2 errors generated.

hash.i.zip

@cor3ntin cor3ntin added the needs-reduction Large reproducer that should be reduced into a simpler form label Jul 14, 2024
@mizvekov
Copy link
Contributor

This looks related to CWG1835, lastly implemented in #98547

Adding template keyword before Storage should fix it, but CWG1835 ended up being a very disruptive change, and in the future we will try make this a warning, not an error.

@cor3ntin
Copy link
Contributor

Fixed by 59e56ee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" needs-reduction Large reproducer that should be reduced into a simpler form
Projects
None yet
Development

No branches or pull requests

5 participants