Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

DYNAMIC/hopscotch_map-prefix/src/hopscotch_map/include/tsl/hopscotch_map.h:428:69: error: 'm_ht' was not declared in this scope; did you mean 'ht'? 428 | void swap(hopscotch_map& other) noexcept(noexcept(other.m_ht.swap(m_ht))) { #65

Open
jikhashkya opened this issue Sep 23, 2024 · 2 comments

Comments

@jikhashkya
Copy link

Hi,

I'm using a third-party library which uses hopscotch-map. It was working fine until I tried to compile it again and it breaks with the following error:

/home/iam/myproject/test/silly_test/build/external/DYNAMIC/hopscotch_map-prefix/src/hopscotch_map/include/tsl/hopscotch_map.h:428:69: error: 'm_ht' was not declared in this scope; did you mean 'ht'?
  428 |   void swap(hopscotch_map& other) noexcept(noexcept(other.m_ht.swap(m_ht))) {
      |                                                                     ^~~~
      |                                                                     ht

The error goes away if i replace m_ht with this->m_ht. But I can't just do that for now since your library is automatically being built my CMake. Any help would be appreciated.
P.S. I'm on a Linux machine with gnu-c++ version 9.3.0.

Thank you.

@Tessil
Copy link
Owner

Tessil commented Sep 23, 2024

Thanks for the report.

It seems to be an issue with g++ 9 as I couldn't reproduce the issue with g++-11 to g++14 (and clang and MSVC in the CI work well). Do you eventually have a more recent version of gcc?

Otherwise could you try this branch https://github.com/Tessil/hopscotch-map/tree/gcc_9_swap?

@jikhashkya
Copy link
Author

@Tessil Thanks for the quick response . It does seem to be an issue with g++ 9 since I didn't have that issue with other versions. I don't have access to other versions in the cluster that I'm working right now but I'll try out the branch that you suggested.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants