|The code is fine, the compiler will generate operator= and the copy constructor for you, it's simply implicit instead of explicit.
Rhe default implementation is a simple bitwise copy.
The way the compiler generates the copy is sort of like:
ClassA::ClassA( const ClassA &from)
:member1( from.member1 )
,member2( from.member2 )
This is perfectly fine for this class since you don't have any pointers to worry about.
The default for operator= is functionally the same as the copy constructor.
So your code for operator+ is correct.
this is copied to result.
result is modified.
this actually remains constant.
So actually to be on the safe side you should do.
CC operator+( CC &source ) const;
CC CC::operator+( CC &source ) const
CC result = *this;
double sum = source.Query_X() + X;
result.Set_X( sum );