Hacks

Interesting python style print in C++

I came across a really interesting piece of C++ code today hidden in this list of obscure C++ features. It includes an implementation of some of the print syntax functionality of python 2 implemented in C++. Here’s the code (copied here, but I’m not the original author):