This question hit the Hot Network list:
In Stroustrup's example, what does the colon mean in "return 1 : 2"?
The question is, basically, about a strange looking syntax found in a C++ book's example. The answer is, equally basically, that it's a misprint or a typo in a book.
There is an off-topic close vote reason (with currently 2 votes) for "typo" questions, which reads:
This question was caused by a problem that can no longer be reproduced or a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers. This can often be avoided by identifying and closely inspecting the shortest program necessary to reproduce the problem before posting.
Normally I would close vote it as a typo question because it's a typo, the three answers agree it's a typo, and, well, it's a typo. But there is also a highly voted comment from a moderator which reads:
Moderator Note: Please think very carefully before casting a vote to close this as a "typo" question. Yes, the problem is a typo, but it's not a typo that the asker made. Rather, it is one found in a published book. That means this question and its answers may well be useful to others in the future, which is a strong counter-indicator for closing it as a typo.
Errors in books, newspapers, and other published sources are corrected by the publisher in errata. This isn't hard to find, generally; a simple web search for ""<name of textbook> errata" will usually bring up something. That is, in my experience, publishers won't make it difficult to find this information, hide it behind paywalls, or try to hide it.
Not just that, but the actual answer to the question points to the errata for the book in question and reproduces the 'corrected' version of the original code.
So, my question is: if a question is about code from a published source (eg. a textbook), and the issue is due to a typo in said published code, does it still fall under the purview of the general "off-topic" close reason for "typographical error"? And, if this is the case, shouldn't the guidance for this close-reason be updated to include this exception?