-
Notifications
You must be signed in to change notification settings - Fork 7
[Work in progress] version zero - scope_guard #20
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
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
| if constexpr (ConstructionExceptionBehavior == exception_during_constuction_behaviour::invoke_exit_func) { | ||
| exit_func(); | ||
|
|
||
| // To throw? or not to throw? |
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.
joke?
| std::is_nothrow_move_constructible_v<InvokeChecker>) | ||
| requires(HasRelease<InvokeChecker> || HasStaticRelease<InvokeChecker>) | ||
| : m_exit_func{std::move(rhs.m_exit_func)}, m_invoke_checker{std::move(rhs.m_invoke_checker)} { | ||
| // TODO: This does not work corectly for a shared invoke checker |
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.
do we need to add a test case?
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
I'll implement the suggested changes soon and update the pull request. Is there a coding or naming guideline for the project? The experimental implementations are not supported in MSVC. |
Ok.
No, we probably should have that though -- I'm just wanting to stick to what the standard does since that's how the wording needs to be written. Also, it minimizes the change for users when they update to the std version.
For the moment MSVC is completely shut off in the CI -- so it's perfectly fine to limit the scope of this PR and add unique_resource real impl in another PR. Note that my current goal is to have a working version by the end of the month. The 'mailing deadline' for the June c++ meeting is the 19th -- so there's a small possibility of getting the initial submission there. |
…ruction, and limits
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
@robert-andrzejuk - unblocking this. I've implemented most of my suggestions and resolved comments. Also made current with current main branch. This will now hopefully pass all the CI My current thinking is we should create a separate issue for the remaining items - including unique_resource. My personal development preference is to do small improvements and update main frequently (especially now that main is being mirrored in godbolt). |
|
I've created issues for the remaining work/discussion here. I'm merging this to main so we have the initial implementation to work from. |
No description provided.