Edgard

上面是我读一本书测试过的例子,书中曾说:This is only one example of code that might behave differently than expected as a result of detailed overload resolution rules. For example, the fact that not all overloaded functions are visible when a corresponding function call is made may or may not matter. In fact, defining a three-argument version of max() without having seen the declaration of a special two-argument version of max() for ints causes the two-argument template to be used by the three-argument version:,这里的意思比较适合第二种情况,即”一个是:inline int const& max申明在template <typename T>
inline T const& max之后。”,我没有能在其他C++编译器上测试过,不知道C++标准中是否规定FunctionTemplate Resolution Rules,如果没有,依据上面的英文描述,不同编译器有不同的FunctionTemplate Resolution Rule,有可能template <typename T>
inline T const& max (T const& a, T const& b, T const& c) 不可见到申明在后的inline int const& max。

大家的意见呢?