The Affine Combination Math Challenge
Channel: CoreCppIL
Date: 03/11/2019

By Amir Kirsh, presented at Core C++ meetup, July 2019. The slides can be found at http://bit.ly/cppaffine.

In one of previous meetups Adi Shavit presented the Affine Math challenge: there is no real logic in adding up two points (result is meaningless) - so we probably may not implement operator+ for Point... Unless we want to calculate an average location, then summing 2 points and dividing by two should be supported, preferably treating the result as a real Point only after the division by 2. We would discuss this problem and see how we can implement methods that return different types for (almost) the same operation. Discussion would go through actual code and some interesting C++ features.