Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

Enable std::is_trivially_copyable in clang #166

Merged
merged 1 commit into from
Jan 31, 2023

Conversation

avitase
Copy link
Contributor

@avitase avitase commented Jan 12, 2023

Clang has this weird behavior of setting __GNUC__ to 4, hence clang will always take the if branch. This is suboptimal because std::is_trivially_copyable has almost always been in clang. This patch should fix it.

Note that starting with clang 15 a warning is raised for the current implementation:
warning: builtin __has_trivial_copy is deprecated; use __is_trivially_copyable instead [-Wdeprecated-builtins]

Clang has this weird behavior of setting __GNUC__ to 4, hence clang will always take the if branch. This is suboptimal because std::is_trivially_copyable has almost always been in clang. This patch should fix it.
Copy link

@clementperon clementperon left a comment

Choose a reason for hiding this comment

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

Got the same issue thanks for the PR

@martinus martinus merged commit bd63205 into martinus:master Jan 31, 2023
@martinus
Copy link
Owner

Thanks! I've merged it

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

Successfully merging this pull request may close these issues.

3 participants