fatal icon indicating copy to clipboard operation
fatal copied to clipboard

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

Open barracuda156 opened this issue 2 years ago • 1 comments

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?

barracuda156 avatar Dec 30 '22 19:12 barracuda156

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 avatar Aug 24 '23 03:08 yfeldblum

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

barracuda156 avatar Apr 27 '24 06:04 barracuda156