Why is no return type specified in this function clearly returns?

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.


它是一个转换运算符,返回类型是Vector2<float>

链接地址: http://www.djcxy.com/p/12712.html

上一篇: 运算符在c ++中重载

下一篇: 为什么没有明确返回该函数中指定的返回类型?