tzlaine / parser

A C++ parser combinator library.
Boost Software License 1.0
69 stars 12 forks source link

Build failure under Apple clang 14 #133

Closed anarthal closed 3 months ago

anarthal commented 4 months ago

Build log is here (edited link): https://github.com/boostorg/mysql/actions/runs/8084450940/job/22089745435

This looks closely related to https://github.com/llvm/llvm-project/issues/54765. This build is in GHA using macos-latest (no container here since OSX doesn't support it).

Compiler details as reported by b2:

tzlaine commented 3 months ago

Unfortunately, C++20 mode is not going to work for any version of Clang before (LLVM) Clang 15. Their concepts implementation does not play nice with libstdc++'s lib, nor does their own lib have all of implemented properly, even though it defines __cpp_lib_ranges.

There is a workaround, though. You can define BOOST_PARSER_DISABLE_CONCEPTS and that should work even in C++20 builds, since it will use the non-concept C++17 implementations.

tzlaine commented 3 months ago

Ah. I just realized the proper fix for this is for me to disable the use of concept constraints in Clang < 16. I mentioned this in #131.