Hacker News new | ask | show | jobs
by quietbritishjim 2437 days ago
Small typo near start:

> Up to C++17, there are four operators the operands of which are unevaluated: typeof, sizeof, decltype, and noexcept.

"typeof" should be "typeid". This confused me a bit as I thought the article was going to talk about a nonstandard predecessor to decltype.

The article was interesting, but its contents didn't really match it's title. It's not about unevaluated operands in general but just their use in SFINAE specifically. For example, sizeof is dismissed as not much use for SFINAE, which is true but it certainly has a lot of other uses! And if you read this article having not seen decltype before, I think you'd get the wrong impression about its range of uses.

1 comments

confusingly typeid can evaluate its expression parameter, if the expression type is polymorphic as the correct type info would be a runtime property (in fact I thought that typeid would always evaluate its parameters, but apparently that's not the case).