Our clang builds on Github Actions with ubuntu-20.04 and clang 10, 11 and 12 fail with
/home/runner/work/purify/purify/build/external/include/sopt/relative_variation.h:44:11: error: no viable overloaded '='
name_ = name;
~~~~~ ^ ~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/basic_string.h:665:7: note: candidate function not viable: 'this' argument has type 'const std::string' (aka 'const basic_string<char>'), but method is not marked const
operator=(const basic_string& __str)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/basic_string.h:675:7: note: candidate function not viable: 'this' argument has type 'const std::string' (aka 'const basic_string<char>'), but method is not marked const
operator=(const _CharT* __s)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/basic_string.h:686:7: note: candidate function not viable: 'this' argument has type 'const std::string' (aka 'const basic_string<char>'), but method is not marked const
operator=(_CharT __c)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/basic_string.h:703:7: note: candidate function not viable: 'this' argument has type 'const std::string' (aka 'const basic_string<char>'), but method is not marked const
operator=(basic_string&& __str)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/basic_string.h:766:7: note: candidate function not viable: 'this' argument has type 'const std::string' (aka 'const basic_string<char>'), but method is not marked const
operator=(initializer_list<_CharT> __l)
^
It's also worth noting that Apple clang-13 happily compiles this. The .travis.yaml file suggests thatclang-5 was previously used. Currently GitHub actions gives us clang-11 by default, with 10 and 12 also available. The same bug appears with them.
Our clang builds on Github Actions with
ubuntu-20.04
andclang
10, 11 and 12 fail withThe include path
/usr/include/c++/10
is the same thatgcc
uses but that seems correct, based on e.g. this stackoverflow thread and another stackoverflow threadThere's a thread reporting a bug in clang which may be related to ours
It's also worth noting that Apple
clang-13
happily compiles this. The.travis.yaml
file suggests thatclang-5
was previously used. Currently GitHub actions gives usclang-11
by default, with 10 and 12 also available. The same bug appears with them.