Skip to content

clang: Incorrect call to copy ctor when RVO required #64792

@kelbon

Description

@kelbon
struct not_movable {
  not_movable() = default;
  not_movable(not_movable&&) = delete;
};

struct type : not_movable {
};

int main() {
    type{not_movable{}}; // clang throws error
}

And... When aggreagate paren init will be supported?((

https://godbolt.org/z/9MPqsfqM6

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions