Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[polymorphic.ctor] Owned object must have cv-unqualified object type #7860

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jwakely
Copy link
Member

@jwakely jwakely commented May 1, 2025

No description provided.

@jwakely
Copy link
Member Author

jwakely commented May 1, 2025

N.B. The incoming paper did say U here, but I think this is editorial because it's inconsistent with the rest of the std::polymoprhic spec. The constructors taking in_place_type_t<U> to specify the type all require is_same_v<remove_cvref_t<U>, U> to be true, so these two constructors are inconsistent. It's unclear what it would even mean to store e.g. const X& as the owned object. So remove_cvref_t<U> is the only reasonable interpretation, and that's what UU is.

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