The exact situation is next:
I have defined in system API structs CGPoint
and CGSize
, and I want to be able to write my_point = my_size
.
I
When you assign a CGSize
to a CGPoint
- what happens? Distil that into some operator and there you have it - for example
CGPoint& operator|=(CGPoint& cPoint, CGSize const& cSize)
{
// now set attributes of cPoint that you can extract from cSize
return cPoint;
}
What's so difficult about this? Here is an example: http://www.ideone.com/FZN20