更新时间:2023-01-23 17:28:25
front
在TestSolution
中没有被覆盖,它已被重载.
front
is not overridden in TestSolution
, it is overloaded.
您可以将重载函数视为完全不同的函数,例如名称不同的函数.
You can regard an overloaded function as a completely different function, like one with a different name.
所以t.front(a)
会调用Tyre
中的那个,而a
会隐式转换为long
.
So t.front(a)
will call the one in Tyre
, with an a
implicitly converted to long
.