What's even more funnier is that if you do void put() { get(); return get(); } gcc won't warn you about discarding void :-)
clang says "warning: attribute 'nodiscard' cannot be applied to functions without return value", when it really attempts to communicate a slightly different position. Should say "is ignored to functions without return value"
"If you don't do your homework you get punished." The word "punished" seems a bit weird here. Anyone know the term that is more likely to be used by teachers or in a school setting?
I think overly hormonal teens/young adults kinda see NSFR connotations from totally benign interactions. Plus it's always best to air on the side of caution while interacting in a teacher-student relationship.
Also get an IDE that has a button that copy/pastes the code with red squigglies together with the compiler error messages into a stackoverflow question and shows you answers as they appear.
Maybe even doing automatic replacements and selecting the one that compiles.
@CupOfJava There is a bit of a derogatory term for the people most likely to have that issue. Unfortunately I've seen both sides of it, where the noise of the people taking things wrong has drowned out the people that were actually harmed. :(