-
Notifications
You must be signed in to change notification settings - Fork 11
noexceptions #88
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
noexceptions #88
Conversation
|
|
Thanks for the contribution as always, I will review tomorrow. |
wusatosi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments
This does make sense to me, I don't know if we want to go with this, we have a meeting agenda on discussion on the config.hpp approach of doing things vs industry standard direct macro detection, I will bring this up. |
|
Hey @20162026 , we will bring up some feedback against CPP.NO_FLAG_FORKING at the weekly sync the coming Monday, I think you have some valuable experience interacting and developing with this rule, would you mind writing a short feedback here so I can forward it to our meeting agenda? |
|
@wusatosi some arguments I could think of right now, mostly regarding this and header only libs in general:
|
|
Thanks for the comments, will forward. |
|
oh also, how do we refer to you? : ) |
|
@wusatosi my name is Edgar if that's what you are asking. Also, PR should be more or less ready, besides the NO_FLAG_FORKING compliance |
Do you think the CMake option that has its default value based on if I can set this up directly on this PR, would you mind that? |
@wusatosi do you mean checking it in the
Feel free to push any changes you see fit. |
Noted, I usually find it rude for people to push directly on my branch, so I always ask HAHA. |
wusatosi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for all the work!
I have one minor question but besides that everything looks great.
| target_compile_options( | ||
| beman.inplace_vector.tests.noexceptions | ||
| PRIVATE -fno-exceptions | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it ensures that there are no throws in the compiled code. Without it, EXPECT_DEATH could still pass if an unhandled exception was thrown.
Although, I'm now not sure if we need the compiler check. It allows running the tests on compilers that don't support or have a different syntax for disabling exceptions (e.g. MSVC). But right now, CI only includes Clang and GCC, and maybe it would be better to error out instead of silently skipping tests on other compilers. On the other hand, it doesn't matter much, as the implementation should be compiler agnostic as long as there is abort()
CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
add support for builds with exceptions disabled #72