I am full-out shocked that the applicability of the "typo" close reason here is at all controversial.
I will start by reminding you that our mission is to build a library of high-quality answers to practical programming problems. The idea is that, rather than just helping one person (a la a help desk), we are helping an imaginably infinite number of future people who have the same (or similar) problem.
If a well-respected book about a major programming language has a typo that has confused one beginner, then it stands to reason that others who are reading the same book might have the same confusion, leading them to seek out an answer. Wouldn't it be nice, then, if we had a high-quality answer already on tap for them to benefit from?
That's the high-level view. I think that stands alone as justification for keeping the question. Note that it's not altogether different from this case, where the fact that the problem arose from a typographical error is irrelevant. What is relevant is that others are likely to have the same problem and would therefore benefit from having an answer.
For pedants who like to lawyer over rules, let's analyze the close reason. You quoted in the question, but here it is again:
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.
When analyzing the applicability of a close reason, it is essential to read both the bolded and non-bolded portions.
The middle sentence here is the strongest counter-indicator of the close reason's applicability to this particular question, and the one I cited in my original comment. It's also the big idea that I spent several paragraphs discussing above. Our primary goal is to help future readers, with helping the original asker being a nice (and not unintended) benefit. So, if the resolution of a typographical error would benefit future readers who are likely to have the same (or similar) question, then the question is suitable for Stack Exchange and should almost certainly not be closed under this reason.
Naturally, there is a bit of subjectivity in this, which is why I worded my original comment on the question the way that I did. I didn't want to make an absolute pronouncement that no one should vote to close the question. Rather, I wanted to emphasize the importance of the "resolved in a manner unlikely to help future readers" phrase. If you believe that the resolution of the question is truly unlikely to help future readers, then close away. But don't close because "oh, it's a typo", because you forgot to read the rest of the close reason.
Failure to read or properly understand this part of the close reason is what led me to suggest tweaking the emphasis placed on various phrases in the "off-topic" close reasons, including this one. I still think both of those proposed changes are a good idea; thanks for reminding me of that.
The raison d'être of the "typo" close reason is to capture questions that were resolved in a manner unlikely to help future readers. It is the modern-day equivalent of the old "too localized" close reason that was widely misused due to its excessive generality. In the modern-day equivalent, it has been contextualized with the most common reason why a question would be unlikely to help future readers—it arose out of a typo. The purpose of the close-vote reason is still the same. It is shooting ourselves in the foot to close and/or delete questions that are suitable for our format and would be helpful to future viewers.
If you read further in the close reason, you come to the third sentence. This suggests that the way to avoid asking a question that will be closed for this reason is to create a MCVE and debugging it. Well, in this case, the asker pretty much did that. What more would you want them to do? They didn't dump their entire project's code in the question and ask you to debug it for them. They didn't have a missing semicolon somewhere in the whole mess that was leading to a messy and irrelevant slew of compiler errors. It didn't arise out of their own sloppiness or carelessness or lack of diligence.
The observation has been made that published sources have errata. The supposed implication is that:
- The asker should have done their own research, found the published errata, and answered the problem themselves, and/or
- The existence of this errata, published elsewhere, makes having the question on Stack Overflow superfluous, as it already has an answer elsewhere.
Don't look now, folks, but that applies to pretty much every question on this site. It is exceptionally rare to break new ground here (and our format is not designed to encourage it); most of what we answer has already been answered somewhere else. So this is a very poor reason to argue that a question is off-topic or should be closed. Again, the point of Stack Exchange Q&A sites is to aggregate that information, distill it into relevant, helpful chunks in the form of answers to specific questions, and have it vetted for correctness and helpfulness by other community members.
Mark Benningfield suggests that perhaps the question should stay open because apparently many people are not aware of the existence of technical errata. I don't know if his motivating assumption is correct or not, but his larger point certainly is. Stated a bit more generally, and at the risk of repeating myself: if the answer would be helpful to others having the same problem, then the question should be answered.
Mark also raises the consideration of downvoting the question because of "lack of effort". That's your right, as always, and is indeed a customary reason for downvoting, but I'm not entirely sure that I agree. I challenge you to find a syntactical question in the c++ tag that cannot be answered by consulting the language specification. Arguing that the question is bad because it has an answer strikes me as rather twisted logic.
This wasn't the sort of low-effort question that we all bemoan. The asker didn't dump his homework or project requirements into the textbox, implicitly asking us to build it for them. There is even evidence in the question that they engaged their brain (!), reasoning through all the uses of the colon that they knew of in the C++ language to try and figure out what this one might be. If you're criticizing them for lack of effort, consider whether you are really criticizing them for knowing less about the C++ language than you. And then consider whether that's really an appropriate criticism.
To answer your specific question here, no, questions about published code should not be added as an "exception" to the close-vote reason, because the close-vote reason already contains sufficient language to allow you to use your brain. The purview of the "off-topic" close reason is to dispatch questions that are actually off-topic for Stack Overflow, because they are unlikely to be of help to future readers. There is no need for an exception once you are properly applying the decision rule.