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

Improve proxy_view #241

Merged
merged 2 commits into from
Feb 19, 2025
Merged

Conversation

mingxwa
Copy link
Collaborator

@mingxwa mingxwa commented Feb 12, 2025

Motivation

I believe this is a design defect, and plan to ship it in 3.2.1 as a bug fix.

The semantics of proxy_view can be reduced. Currently, one needs to use proxy<const F> to invoke any const conventions. With this change, users will have access to all the indirect conventions via a proxy_view<F> object as if it were a proxy<F> object.

On the other hand, basic_facade_builder::add_view is removed due to incompatibility with support_view.

Changes

  • Modified the definition of observer_facade<F> to make it inherit all the indirect conventions from F. Removed the const F specializations.
  • Removed basic_facade_builder::add_view.
  • Modified details::proxy_view_dispatch. Changed the return type from a raw pointer to a new type observer_ptr that is aware of the derecerenced types of the cv-ref qualified original pointer types.
  • Updated unit tests accordingly.
  • Updated spec and sample code accordingly.
  • Pumped library version to 3.2.1.

@mingxwa mingxwa requested review from tian-lt and guominrui February 12, 2025 16:03
@mingxwa mingxwa force-pushed the user/mingxwa/fix-proxy-view branch from f26dbd5 to 1d3de9a Compare February 17, 2025 13:18
@mingxwa mingxwa merged commit 777510b into microsoft:main Feb 19, 2025
7 checks passed
@mingxwa mingxwa deleted the user/mingxwa/fix-proxy-view branch February 19, 2025 05:18
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.

2 participants