Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please support clang #4

Merged
merged 1 commit into from
Sep 17, 2024
Merged

Please support clang #4

merged 1 commit into from
Sep 17, 2024

Conversation

toge
Copy link
Contributor

@toge toge commented Sep 8, 2024

I met a compilation error on clang 13.

In file included from include/seq/devector.hpp:32:
include/seq/type_traits.hpp:43:9: error: redefinition of 'is_trivially_copyable'
        struct is_trivially_copyable
               ^
/usr/local/bin/../lib/gcc/x86_64-linux-gnu/10.3.0/../../../../include/c++/10.3.0/type_traits:676:12: note: previous definition is here
    struct is_trivially_copyable
           ^
In file included from /home/conan/workspace/prod-v1/bsr/cci-3b6fc35d/recipes/seq/all/test_package/test_package.cpp:2:
In file included from include/seq/devector.hpp:32:
include/seq/type_traits.hpp:49:9: error: redefinition of 'is_trivially_move_assignable'
        struct is_trivially_move_assignable : is_trivially_copyable<T> {};
               ^
/usr/local/bin/../lib/gcc/x86_64-linux-gnu/10.3.0/../../../../include/c++/10.3.0/type_traits:1318:12: note: previous definition is here
    struct is_trivially_move_assignable
           ^

This is caused by the is_trivially_copyable condition.
The __GNUG__ and __GNUC__ macros are defined in clang as well as gcc.
The presence of the __clang__ macro should be checked to distinguish it from gcc.

Copy link
Owner

@Thermadiag Thermadiag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for the fix! Odly, it works with ClangCl...

@Thermadiag Thermadiag merged commit 082e4f7 into Thermadiag:main Sep 17, 2024
@toge
Copy link
Contributor Author

toge commented Sep 17, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants