-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[[nodiscard]] for constructors #1495
[[nodiscard]] for constructors #1495
Conversation
These are definitely the most important places, but if I remember correctly we were leaning on putting it on everywhere it is not wrong, which is essentially everywhere. |
I don't think using it everywhere was the intent of this feature, because creating an unused temporary of literally every class makes no sense. Putting it everywhere would just be a code bloat. |
I suspect that there's user code out there that's constructing unused That said, I think that marking the Standard "guard" classes is sufficient to declare this feature to be complete (the feature is already "extra credit" in the sense that the Library isn't required to do anything). We have a tracking issue to use |
This looks good to me! The questions I thought about were:
|
@CaseyCarter @AdamBucior In addition to using plain I wondered if |
Searching for |
I knew I was forgetting something! I've updated the |
Thanks for improving the STL's diagnostics! Whenever these |
Fixes #63.
If there are any more places where it would make sense to add
[[nodiscard]]
please let me know.