Possible Duplicate:
Operator overloading
I am seeing this in a piece of sample code:
operator Vector2<float>() const {
return Vector2<float>(x, y); }
My 2 questions about this:
1) The function clearly returns, but there's no return type specified?
2) It's not clear exactly what is getting overloaded here, which operator.
It's a conversion operator, and the return type is Vector2<float>
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With