Repository navigation
Conversation
mingxwa
requested review from
guominrui,
tian-lt,
tian-lt-personal and
zhihaoy
November 18, 2026 14:43
- Added a deleted destructor for `F::destructibility == lifetime_requirement::none`, because `proxy` was ill-formed for such a facade when no destructor could be selected. It is declared before the other destructors, because NVHPC 26.3 otherwise selected it while checking `*this = proxy{rhs}` in a member template and rejected code that never used such a facade.
- Stopped delegating in `proxy(std::nullptr_t)`, because GCC, Clang and MSVC reject a delegating constructor of a class whose destructor is deleted. The destructor would run if the delegating constructor exited via an exception ([except.ctor]/4).
- Excluded the relocating `swap` when destruction is forbidden, because it needs a temporary `proxy`.
- Added static assertions for the deleted destructor and the `swap` constraint, and a test that constructs such a `proxy` with a *new-expression*.
mingxwa
force-pushed
the
user/mingxwa/destroy
branch
from
November 18, 2026 15:07
b9c93a4 to
898f5b1
Compare
mingxwa
marked this pull request as draft
November 18, 2026 21:19
mingxwa
force-pushed
the
user/mingxwa/destroy
branch
from
November 19, 2026 05:57
898f5b1 to
b881717
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
F::destructibility == lifetime_requirement::none, becauseproxywas ill-formed for such a facade when no destructor could be selected. It is declared before the other destructors, because NVHPC 26.3 otherwise selected it while checking*this = proxy{rhs}in a member template and rejected code that never used such a facade.proxy(std::nullptr_t), because GCC, Clang and MSVC reject a delegating constructor of a class whose destructor is deleted. The destructor would run if the delegating constructor exited via an exception ([except.ctor]/4).swapwhen destruction is forbidden, because it needs a temporaryproxy.swapconstraint, and a test that constructs such aproxywith a new-expression.