Say I have:
class Vector3 { float x, y, z; ... bunch of cuntions .. static operator+(const Vector3&, const Vector3); };
Now suppose I want to have classes:
Position, Velocity,
which exactly match Vector3 (basically I want
typedef Vector3 Position; typedef Vector3 Velocity;
Except if:
Position position; Vector3 vector3; Velocity velocity;
I want to make sure the following cannot happen:
position + vector3; vector3 + velocity; velocity + position;
What is the best way to achieve this?
source share