I would like to clearly distinguish between 3D and 2D points in my code. The obvious solution would be to have separate classes.
On the other hand conversions from 3D points with z = 0 to 2D points are quite common. Therefore I would like to use a common base class so I can do those conversions in-place in memory. To keep the types apart clearly I would like to forbid the implicit conversion to that base class. Is that doable?
Or is there maybe a different way to create different types with similar function like this?