Skip to content

Extra requirements in union __lazy_ctor_storage::setup() method #2813

Description

@SergeyKopienko

new (&__v) _Tp(std::forward<_U>(init));

The unqualified &__v selects a user-defined operator& if _Tp has one.
For a type with a deleted operator& this is a compile error.
std::addressof(__v) should be used instead.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions