-
-
Notifications
You must be signed in to change notification settings - Fork 240
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
Display the special operations generated by the compiler #224
Comments
I see that there is something that add comments However, I don't know how to get those in my link. BTW, why add hem as comments? |
Oh, I believe I start to understand what the tool is doing thanks to the reading of http://www.modernescpp.com/index.php/c-insights-conversions The signatures are added only if used and really generated by the compiler. While this could cover the good uses, it can not cover the bad uses as the code couln't compile. Wondering of the interest of having the delete independetly of the usage. |
And your blog https://www.andreasfertig.blog/2019/03/hello-c-insights.html |
Hello @viboes, that looks like an documentation issue. You have figured it out right, the special members are only show if they are used. The simple reason for that is, that Clang does not even border to generate them in the AST if they are not used.
This means making up the signature of the special members and by that introducing code that is not there in the first place. The question here is, is that a real benefit? Does it make the program easier and more intuitively to use?
The idea here is to leave the input code as untouched as possible. Adding them for real changes the behavior, because now it is a user provided special member.
Ah I see, you are talking about this sentence "The about page page already lists some examples."? I have to correct the article. I moved all the examples to a dedicated page examples.html Andreas |
Yes, it is a documenttaion issue that needs clarification. As for For the comments, AFAIW, the use of =default will not change the behavior as far as it is done only at the declarations. In this case th eoperation is not considered user defined. We could consider it as an anhancement. The missing links are for me on the documentaion of the tool. I woul dhad appreciate link to your blog and the Grimm's blog. We could consider it as an anhancement.
|
After the creation of these 4 issues, I believe we can close this one #230 Add links to the blogs |
It would be great if the tool could show the special operations generated by the compiler as well as the ones requested using 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
https://cppinsights.io/s/cd13011a
After
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.
The text was updated successfully, but these errors were encountered: