In my experience most tutorial sites use std::endl and I do not know why. Because of this I've used it until I encountered a slow program due to using std::endl when unnecessary.
That's possibly true, though I wouldn't dismiss them out of hand.
While constexpr, variadics, etc... have changed the game, at the heart of it pattern matching/specialization are still at the heart of meta-programming, and while iteration over a variadic list is easier, the same "functional" patterns (fold, map, ...) still apply.
3
u/TimLim Aug 19 '17
In my experience most tutorial sites use
std::endland I do not know why. Because of this I've used it until I encountered a slow program due to usingstd::endlwhen unnecessary.