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 portability of IMMER_THROW when exceptions are disabled #275

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

tjaneczko
Copy link
Contributor

The current implementation of IMMER_THROW when exceptions are disabled relies on the compiler converting a character array to a truthy value, which can throw warnings and is not truly portable. Instead, we can use the comma operator to portably add additional data to an assertion: https://en.cppreference.com/w/cpp/error/assert.

The current implementation of IMMER_THROW when exceptions are disabled relies on the compiler converting a character array to a truthy value, which can throw warnings and is not truly portable. Instead, we can use the comma operator to portably add additional data to an assertion: https://en.cppreference.com/w/cpp/error/assert.
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5875f77) 90.53% compared to head (e644569) 90.53%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #275   +/-   ##
=======================================
  Coverage   90.53%   90.53%           
=======================================
  Files         119      119           
  Lines       12144    12144           
=======================================
  Hits        10994    10994           
  Misses       1150     1150           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@arximboldi arximboldi merged commit d7984f4 into arximboldi:master Jan 17, 2024
18 of 20 checks passed
@arximboldi
Copy link
Owner

Nice one!

@tjaneczko tjaneczko deleted the patch-1 branch January 17, 2024 23:14
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.

3 participants