C++14 Whitespace Overloading

This is an old idea from Bjarne Stroustrup (Creator of c++) finally making it into the standard.  The idea is to be able to write:

x y

to mean “multiply x by y”.  The implementation is simple:


float operator (float a, float b) { return a * b; }

or more explicitly:


float operator ' '(float a, float b) { return a * b; }

There are actually much more to Stroustrup proposal, which I suggest you to read: http://www.stroustrup.com/whitespace98.pdf.  It’s an interesting and good read, and depending on your mindset and personality, it can also be a good laugh.

Even if not all the compilers on the floor actually fully support C++14, You should use whitespace overloading anyway.