Skip to content

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

Closed
@kraj

Description

@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<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

Activity

added
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"
and removed on Jul 14, 2024
llvmbot

llvmbot commented on Jul 14, 2024

@llvmbot
Member

@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

added
needs-reductionLarge reproducer that should be reduced into a simpler form
on Jul 14, 2024
mizvekov

mizvekov commented on Jul 17, 2024

@mizvekov
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

cor3ntin commented on Jul 17, 2024

@cor3ntin
Contributor

Fixed by 59e56ee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"needs-reductionLarge reproducer that should be reduced into a simpler form

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @kraj@mizvekov@cor3ntin@EugeneZelenko@llvmbot

        Issue actions

          error: no member named 'get' in the global namespace · Issue #98775 · llvm/llvm-project