fatal
fatal copied to clipboard
Tests build fail: fatal/test/env.h:29:10: error: no match for 'operator[]'
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?
I just fixed up all of the compile failures I ran into when building fatal with gcc12 on linux (RH devtoolset-12) in b81bb23e1b220147d27aa147272e0a69a3f6ec4a. But I was not able to repro this compile failure.
@yfeldblum Sorry, looks like I missed this one. I will try with the current version.