conversion operator as standalone function
The one reason I can think of is to prevent implicit conversions being applied to the thing being cast. In your example, if you said: bool( “foo” ); then “foo” would be implicitly converted to a string, which would then have the explicit bool conversion you provided applied to it. This is not possible if … Read more