Let me give you a heads up first. This is a general c++ question. not a boost one. But posting it here as we've C++ gurus out there. I've this piece of code
The code fails to compile when St.1 is uncommented. I read some documents on operator overloading and namespaces and moved the output operator into the same namespace as the class (skg). This works fine.
But my question is different.
If the output operator is in global namespace and class in skg namespace St. 2 (cout statement) works fine, but not the copy statement. Why ?
Thanks in advance, and apologies for offtopic.
Surya