Quote:Original post by rip-offQuote:
Ok, if, suppose, I want to overload the cast operator (operator signed int())?
This is almost never a good idea. It can cause all sorts of subtle bugs.
And if I make it private (sorry, forgot to mention it), add some "friends" as well as static_cast (imagine it's just a template function that may be controlled by a user/developer), it will cause no sorts of problems.