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

Fix issue https://github.com/skypjack/entt/issues/1213#issue-2810640371 #1214

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

acilione
Copy link

All tests passed

image

@skypjack
Copy link
Owner

skypjack commented Jan 27, 2025

I see your concern. However, I don't think that making all constructors noexcept(false) because of a faulty compiler is the way to go. We can make them conditionally noexcept instead and have the good compilers take advantage of it. Sounds reasonable?

@skypjack skypjack self-requested a review January 27, 2025 15:17
@skypjack skypjack self-assigned this Jan 27, 2025
@skypjack skypjack added the enhancement accepted requests, sooner or later I'll do it label Jan 27, 2025
@acilione
Copy link
Author

Sorry, only now I had time to look at it.

Do you think something like would be clean enough?

#if defined(GNUC) && !defined(clang)
#define NOEXCEPT noexcept(false)
#else
#define NOEXCEPT noexcept
#endif

I made a little trial program to ensure that NOEXCEPT = noexcept(false) only when g++ is used

@skypjack
Copy link
Owner

skypjack commented Feb 3, 2025

I think the last proposal suffers from the same problem actually. What version of the compiler causes the issue exactly? I can try to pack a workflow on the CI to make some tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement accepted requests, sooner or later I'll do it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants