Skip to content

Add a limitation respect to the generated =deleted special operations #233

@viboes

Description

@viboes

As for Display the special operations generated by the compiler #224 discussion, we have identified the tool do not transforms the special operations functions that are deleted by the compiler. This is surely due to the fact that the tool is based on the AST and this information is not still there.

When the user request the default and the compiler deletes the function as he default generated will be ill formed, the tool could replace =default by =delete.

Before

struct C
{
int & i;
C() = default;
C(const C &) = default;
};

https://cppinsights.io/s/cd13011a

After

struct C
{
int & i;
inline C() = delete;
inline C(const C &) = delete;
};

I believe that the documentation could report this limitation on a specific section

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions