Hello Lektrix,
I see, but not quite understand it fully.
For one TheSorcerer never said he was going to use it the way you state. Since if you don''t declare a copy constructor or an assignment operator the compiler will create one for you.
For two I would have to say that looking a lang two = 2 + one is not very intuitively to understand what is going on.
You say that when you have lang two = 2 + one that implicitly converted, is it the 2 that is which I can see that.
does lan two = 2 + one => two(2) + one;
or is it suppose to be lang two( 2 + one);
if = is a short hand for a constructor then it should be
lang two = 2 + one => lang two ( 2 + one )
If it the 2nd case the compiler is going to convert 2 into a lang object and then call the friend function. All under this assumption: lang two ( 2+one) turns into two ( lang(2) + one).
Now if compiler can do this to 2 then it should have no problem then doing this through operator member method either. Once the 2 is converted into a lang object then + method with one can be use and then the return object assign to two.
Or am I missing something here, which could be total true
But just rewrite lang two = one + 2 and you get same thing with my suggestion. Since then compile would convert 2 into a lang and then + operator of one is call and then it assign to two.
Just try to figure your explanation out.
Lord Bart
PS I not sure if I explain my part well either