Open the-moisrex opened 1 week ago
I probably fixed the above one by using c++20
instead of c++23
, but now we have another one:
/usr/bin/clang++ -DFMT_SHARED -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -isystem /usr/include/libevdev-1.0 -g -std=c++20 -fcolor-diagnostics -I/usr/include/libevdev-1.0 -MD -MT CMakeFiles/foresight.dir/keyboard.ixx.o -MF CMakeFiles/foresight.dir/keyboard.ixx.o.d @CMakeFiles/foresight.dir/keyboard.ixx.o.modmap -o CMakeFiles/foresight.dir/keyboard.ixx.o -c /foresight/keyboard.ixx
In module 'foresight.evdev' imported from /foresight/keyboard.ixx:9:
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../include/c++/14.1.1/compare:397:22: error: 'std::__detail::__common_cmp_cat' has different definitions in different modules; definition in module 'foresight.evdev.<global>' first difference is function body
397 | constexpr auto __common_cmp_cat()
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
398 | {
| ~
399 | constexpr unsigned __cats = (__cmp_cat_id<_Ts> | ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
400 | // If any Ti is not a comparison category type, U is void.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
401 | if constexpr (__cats & 1)
| ~~~~~~~~~~~~~~~~~~~~~~~~~
402 | return;
| ~~~~~~~
403 | // Otherwise, if at least one Ti is std::partial_ordering,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
404 | // U is std::partial_ordering.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
405 | else if constexpr (bool(__cats & __cmp_cat_id<partial_ordering>))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
406 | return partial_ordering::equivalent;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
407 | // Otherwise, if at least one Ti is std::weak_ordering,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
408 | // U is std::weak_ordering.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
409 | else if constexpr (bool(__cats & __cmp_cat_id<weak_ordering>))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
410 | return weak_ordering::equivalent;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
411 | // Otherwise, U is std::strong_ordering.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
412 | else
| ~~~~
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../include/c++/14.1.1/compare:397:22: note: but in '' found a different body
397 | constexpr auto __common_cmp_cat()
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
398 | {
| ~
399 | constexpr unsigned __cats = (__cmp_cat_id<_Ts> | ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
400 | // If any Ti is not a comparison category type, U is void.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
401 | if constexpr (__cats & 1)
| ~~~~~~~~~~~~~~~~~~~~~~~~~
402 | return;
| ~~~~~~~
403 | // Otherwise, if at least one Ti is std::partial_ordering,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
404 | // U is std::partial_ordering.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
405 | else if constexpr (bool(__cats & __cmp_cat_id<partial_ordering>))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
406 | return partial_ordering::equivalent;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
407 | // Otherwise, if at least one Ti is std::weak_ordering,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
408 | // U is std::weak_ordering.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
409 | else if constexpr (bool(__cats & __cmp_cat_id<weak_ordering>))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
410 | return weak_ordering::equivalent;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
411 | // Otherwise, U is std::strong_ordering.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
412 | else
| ~~~~
1 error generated.
[17/22] Building CXX object CMakeFiles/foresight.dir/intercept.ixx.o
FAILED: CMakeFiles/foresight.dir/intercept.ixx.o CMakeFiles/foresight.dir/foresight.intercept.pcm
/usr/bin/clang++ -DFMT_SHARED -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -isystem /usr/include/libevdev-1.0 -g -std=c++20 -fcolor-diagnostics -I/usr/include/libevdev-1.0 -MD -MT CMakeFiles/foresight.dir/intercept.ixx.o -MF CMakeFiles/foresight.dir/intercept.ixx.o.d @CMakeFiles/foresight.dir/intercept.ixx.o.modmap -o CMakeFiles/foresight.dir/intercept.ixx.o -c /foresight/intercept.ixx
In module 'foresight.evdev' imported from /foresight/intercept.ixx:6:
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../include/c++/14.1.1/compare:397:22: error: 'std::__detail::__common_cmp_cat' has different definitions in different modules; definition in module 'foresight.evdev.<global>' first difference is function body
397 | constexpr auto __common_cmp_cat()
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
398 | {
| ~
399 | constexpr unsigned __cats = (__cmp_cat_id<_Ts> | ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
400 | // If any Ti is not a comparison category type, U is void.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
401 | if constexpr (__cats & 1)
| ~~~~~~~~~~~~~~~~~~~~~~~~~
402 | return;
| ~~~~~~~
403 | // Otherwise, if at least one Ti is std::partial_ordering,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
404 | // U is std::partial_ordering.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
405 | else if constexpr (bool(__cats & __cmp_cat_id<partial_ordering>))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
406 | return partial_ordering::equivalent;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
407 | // Otherwise, if at least one Ti is std::weak_ordering,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
408 | // U is std::weak_ordering.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
409 | else if constexpr (bool(__cats & __cmp_cat_id<weak_ordering>))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
410 | return weak_ordering::equivalent;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
411 | // Otherwise, U is std::strong_ordering.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
412 | else
| ~~~~
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../include/c++/14.1.1/compare:397:22: note: but in '' found a different body
397 | constexpr auto __common_cmp_cat()
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
398 | {
| ~
399 | constexpr unsigned __cats = (__cmp_cat_id<_Ts> | ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
400 | // If any Ti is not a comparison category type, U is void.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
401 | if constexpr (__cats & 1)
| ~~~~~~~~~~~~~~~~~~~~~~~~~
402 | return;
| ~~~~~~~
403 | // Otherwise, if at least one Ti is std::partial_ordering,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
404 | // U is std::partial_ordering.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
405 | else if constexpr (bool(__cats & __cmp_cat_id<partial_ordering>))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
406 | return partial_ordering::equivalent;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
407 | // Otherwise, if at least one Ti is std::weak_ordering,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
408 | // U is std::weak_ordering.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
409 | else if constexpr (bool(__cats & __cmp_cat_id<weak_ordering>))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
410 | return weak_ordering::equivalent;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
411 | // Otherwise, U is std::strong_ordering.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
412 | else
| ~~~~
1 error generated.
[18/22] Building CXX object CMakeFiles/foresight.dir/evdev.cxx.o
FAILED: CMakeFiles/foresight.dir/evdev.cxx.o
/usr/bin/clang++ -DFMT_SHARED -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -isystem /usr/include/libevdev-1.0 -g -std=c++20 -fcolor-diagnostics -I/usr/include/libevdev-1.0 -MD -MT CMakeFiles/foresight.dir/evdev.cxx.o -MF CMakeFiles/foresight.dir/evdev.cxx.o.d @CMakeFiles/foresight.dir/evdev.cxx.o.modmap -o CMakeFiles/foresight.dir/evdev.cxx.o -c /foresight/evdev.cxx
In module 'foresight.evdev' imported from /foresight/evdev.cxx:8:
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../include/c++/14.1.1/compare:397:22: error: 'std::__detail::__common_cmp_cat' has different definitions in different modules; definition in module 'foresight.evdev.<global>' first difference is function body
397 | constexpr auto __common_cmp_cat()
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
398 | {
| ~
399 | constexpr unsigned __cats = (__cmp_cat_id<_Ts> | ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
400 | // If any Ti is not a comparison category type, U is void.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
401 | if constexpr (__cats & 1)
| ~~~~~~~~~~~~~~~~~~~~~~~~~
402 | return;
| ~~~~~~~
403 | // Otherwise, if at least one Ti is std::partial_ordering,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
404 | // U is std::partial_ordering.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
405 | else if constexpr (bool(__cats & __cmp_cat_id<partial_ordering>))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
406 | return partial_ordering::equivalent;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
407 | // Otherwise, if at least one Ti is std::weak_ordering,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
408 | // U is std::weak_ordering.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
409 | else if constexpr (bool(__cats & __cmp_cat_id<weak_ordering>))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
410 | return weak_ordering::equivalent;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
411 | // Otherwise, U is std::strong_ordering.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
412 | else
| ~~~~
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../include/c++/14.1.1/compare:397:22: note: but in '' found a different body
397 | constexpr auto __common_cmp_cat()
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
398 | {
| ~
399 | constexpr unsigned __cats = (__cmp_cat_id<_Ts> | ...);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
400 | // If any Ti is not a comparison category type, U is void.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
401 | if constexpr (__cats & 1)
| ~~~~~~~~~~~~~~~~~~~~~~~~~
402 | return;
| ~~~~~~~
403 | // Otherwise, if at least one Ti is std::partial_ordering,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
404 | // U is std::partial_ordering.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
405 | else if constexpr (bool(__cats & __cmp_cat_id<partial_ordering>))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
406 | return partial_ordering::equivalent;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
407 | // Otherwise, if at least one Ti is std::weak_ordering,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
408 | // U is std::weak_ordering.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
409 | else if constexpr (bool(__cats & __cmp_cat_id<weak_ordering>))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
410 | return weak_ordering::equivalent;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
411 | // Otherwise, U is std::strong_ordering.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
412 | else
| ~~~~
1 error generated.
ninja: build stopped: subcommand failed.
Clang version:
17.0.6
Somehow
std::get<I>
is non-existent from the eye of clang when using C++20 modules. GCC works just fine.