soasis / text

A spicy text library for C++ that has the explicit goal of enabling the entire ecosystem to share in proper forward progress towards a bright Unicode future.
https://ztdtext.readthedocs.io/en/latest/
Other
313 stars 24 forks source link

Compilation error when including <ztd/text.hpp> #44

Closed melton1968 closed 1 month ago

melton1968 commented 6 months ago

I folllowed the cmake install instruction and the ztd libraries all seem to compile correctly. However, in my main program, including the file <ztd/text.hpp> causes the following compilation errors on MacOS Sonoma 14.4 using clang-16.0.6. Any help is appreciated.

In file included from /Users/mmelton/work/tetris-cpp/build/_deps/ztd.text-src/include/ztd/text.hpp:39: In file included from /Users/mmelton/work/tetris-cpp/build/_deps/ztd.text-src/include/ztd/text/encoding.hpp:39: In file included from /Users/mmelton/work/tetris-cpp/build/_deps/ztd.text-src/include/ztd/text/execution.hpp:40: In file included from /Users/mmelton/work/tetris-cpp/build/_deps/ztd.text-src/include/ztd/text/impl/execution_cuc\ har.hpp:48: In file included from /Users/mmelton/work/tetris-cpp/build/_deps/ztd.text-src/include/ztd/text/detail/encoding_na\ me.hpp:44: In file included from /Users/mmelton/work/tetris-cpp/build/_deps/ztd.text-src/include/ztd/text/iconv_names.hpp:38\ : In file included from /Users/mmelton/work/tetris-cpp/build/_deps/ztd.idk-src/include/ztd/idk/c_string_view.hpp:38\ : /Users/mmelton/work/tetris-cpp/build/_deps/ztd.idk-src/include/ztd/idk/basic_c_string_view.hpp:313:40: error: redefinition of 'tag_invoke' as different kind of symbol friend constexpr basic_c_string_view tag_invoke(ztd::tag_t<::ztd::ranges::reconstruct>, ^ /Users/mmelton/work/tetris-cpp/build/_deps/ztd.idk-src/include/ztd/tag_invoke/tag_invoke.hpp:78:50: note: previous definition is here inline constexpr __tginv_detail::tag_invoke_fn tag_invoke {};

                                                           ^
puremourning commented 1 month ago

This is a bug in clang 16, as reported here: https://github.com/soasis/text/issues/42

ThePhD commented 1 month ago

It doesn't matter if it's a bug in Clang 16; I've nuked tag_invoke from the repository anyways. Should work now.