So if you're trying to convert between

`Vec3`

and `Vector3`

, it would be something like this:C++

Copy Code

struct Vec3 { operator Vec3(const Vector3& v); // constructor that converts v to a Vec3 operator Vector3(); // operator that converts a Vec3 to a Vector3 // other members }; struct Vector3 { operator Vector3(const Vec3& v); // constructor that converts v to a Vector3 operator Vec3(); // operator that converts a Vector3 to a Vec3 // other members }; v1a Vec3(<args1>); v2a Vector3(<args2>); v1b Vec3(v2a); v2b Vector3(v1a);And now each vector has both versions.

**EDIT**: Those were converting constructors. If you want a conversion

*operator*, it has to go in the class being converted. I've edited the above to show them. You can make any of the converters

`explicit`

if you have problems with unintended conversions, but I don't think that will happen here. It's more likely when providing conversion to basic types, like `bool`

.From the above,

Copy Code

v1a = v2a;should invoke the conversion operator

`Vector3::operator Vec3`

.
See https://en.cppreference.com/w/cpp/language/types.