-
-
Notifications
You must be signed in to change notification settings - Fork 262
Closed
Description
It would be great if the tool could show the special operations generated by the compiler as well as the ones requested using default.
struct C {
int i;
};struct C {
int i;
C() = default;
C(C const&) = default;
C(C &&) = default;
C& operator=(C const&) = default;
C& operator=(C &&) = default;
~C() noexcept = default;
};In addition 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;
};
P.S. I'm not asking to show the generated code, just to show what are the provided operations and which ones are deleted.
This doesn't mean thathaving the option to have the code as well will not be welcome.
Metadata
Metadata
Assignees
Labels
No labels