Or even simpler
or_combinator = liftM2 (||)
but that requires Haskell knowledge to understand. So you might see it in production code, but your version is the right one for the blog. And the original author's version may be even better for comprehension by C++ programmers.
Re:What Does Haskell Have to Do with C++?
by andymorris on Thursday November 25, 2010 @11:17PM
(#1941621)
When you get templates working, it does feel pretty good - you can get an approximation of the power of functional languages, all the while knowing that your code has been directly mapped to assembly.
I don't know if it's as good as writing some neat functional code, but for me it's still fun!
I suppose he was trying to demonstrate that the evaluation does not occur until the value is applied though, if the audience was more familiar with C++.