1. 程式人生 > >std::min 3個引數 卻提供兩個

std::min 3個引數 卻提供兩個

error C2780: “const _Ty &std::min(const _Ty &,const _Ty &,_Pr)” : 應輸入 3 個引數,卻提供了 2 個
        /include/xutility(1265) : 參見“std::min”的宣告
error C2782: “const _Ty &std::min(const _Ty &,const _Ty &)” : 模板引數“_Ty”不明確
        /include/xutility(1257) : 參見“std::min”的宣告

原因: std::min(a, b) 其中 a 和 b 的變數型別不相同。