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

Tests build fail: fatal/test/env.h:29:10: error: no match for 'operator[]' #134

Closed
barracuda156 opened this issue Dec 30, 2022 · 2 comments

Comments

@barracuda156
Copy link

I have tried to build a few tests on macOS with gcc12 (C++14 and -O2, as recommended), however it fails with:

./fatal/test/env.h: In instantiation of 'void fatal::test_impl::env::parse_env(const char* const*, Map&) [with Map = std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >]':
./fatal/test/env.h:38:12:   required from 'Map fatal::test_impl::env::parse_env(const char* const*) [with Map = std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >]'
./fatal/test/driver.h:51:59:   required from here
./fatal/test/env.h:29:10: error: no match for 'operator[]' (operand types are 'std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >' and '<brace-enclosed initializer list>')
   29 |       map[{*e, p}] = p + 1;
      |       ~~~^

What is going wrong?

@yfeldblum
Copy link
Contributor

I just fixed up all of the compile failures I ran into when building fatal with gcc12 on linux (RH devtoolset-12) in b81bb23. But I was not able to repro this compile failure.

@barracuda156
Copy link
Author

@yfeldblum Sorry, looks like I missed this one. I will try with the current version.

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

No branches or pull requests

2 participants